<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   丹张: RHadoop实践系列之二：RHadoop安装与使用  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({
          tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
          TeX: {equationNumbers: {autoNumber: "AMS"}}
        });
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/2013/03/rhadoop2-rhadoop/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466440451: Accept with keywords: (title(0.4):中国,统计学,服务平台,Hadoop,门户网站, topn(0.233333333333):操作系统,是不是,Hadoop,R语言,内存,目录,类库,史丹佛大,hadoop,例子,文章,日志,数据,节点,函数,矩阵,环境,用户,问题,命令,学院,权限,文字说明,你好,错误,部分,代码,程序,版本,原因).-->
 </head>
 <body class="single single-post postid-7551 single-format-standard sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    丹张: RHadoop实践系列之二：RHadoop安装与使用
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/">
       <img src="http://cos.name/wp-content/themes/COS-kermesinus/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <a class="screen-reader-text skip-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/#content" title="跳至内容">
        跳至内容
       </a>
       <div class="menu-%e6%88%91%e7%9a%84%e8%8f%9c%e5%8d%95-container">
        <ul class="nav-menu" id="menu-%e6%88%91%e7%9a%84%e8%8f%9c%e5%8d%95">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-4746" id="menu-item-4746">
          <a href="http://cos.name">
           主页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-8120" id="menu-item-8120">
          <a href="http://cos.name/cn">
           论坛
          </a>
          <ul class="sub-menu">
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8124" id="menu-item-8124">
            <a href="http://cos.name/cn/wp-login.php?action=register">
             论坛注册
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8125" id="menu-item-8125">
            <a href="http://cos.name/cn/wp-login.php">
             论坛登录
            </a>
           </li>
          </ul>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8110" id="menu-item-8110">
          <a href="http://cos.name/books/">
           图书资料
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8112" id="menu-item-8112">
          <a href="http://cos.name/videos">
           视频教程
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8333" id="menu-item-8333">
          <a href="http://cos.name/salon/">
           统计沙龙
          </a>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8111" id="menu-item-8111">
          <a href="http://cos.name/chinar/">
           R语言会议
          </a>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8109" id="menu-item-8109">
          <a href="http://cos.name/training/">
           讲座与培训
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8115" id="menu-item-8115">
          <a href="http://cos.name/cn/forum/comprehensive/job/">
           招聘信息
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-4780" id="menu-item-4780">
          <a href="http://cos.name/about">
           关于我们
          </a>
          <ul class="sub-menu">
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8113" id="menu-item-8113">
            <a href="http://cos.name/2008/11/how-to-work-with-cos/">
             加入我们
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8119" id="menu-item-8119">
            <a href="http://cos.name/donate/">
             赞助我们
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8114" id="menu-item-8114">
            <a href="http://cos.name/cn/forum/26">
             项目合作
            </a>
           </li>
          </ul>
         </li>
        </ul>
       </div>
       <form action="http://cos.name/" class="search-form" method="get" role="search">
        <label>
         <span class="screen-reader-text">
          搜索：
         </span>
        </label>
       </form>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-7551 post type-post status-publish format-standard hentry category-software tag-hadoop tag-mapreduce tag-rhadoop tag-r-language tag-663" id="post-7551">
        <header class="entry-header">
         <h1 class="entry-title">
          RHadoop实践系列之二：RHadoop安装与使用
         </h1>
         <div class="entry-meta">
          <span class="date">
           <a href="http://cos.name/2013/03/rhadoop2-rhadoop/" rel="bookmark" title="链向RHadoop实践系列之二：RHadoop安装与使用的固定链接">
            <time class="entry-date" datetime="2013-03-24T21:59:56+00:00">
             2013/03/24
            </time>
           </a>
          </span>
          <span class="categories-links">
           <a href="http://cos.name/category/software/" rel="category tag">
            软件应用
           </a>
          </span>
          <span class="tags-links">
           <a href="http://cos.name/tag/hadoop/" rel="tag">
            hadoop
           </a>
           、
           <a href="http://cos.name/tag/mapreduce/" rel="tag">
            MapReduce
           </a>
           、
           <a href="http://cos.name/tag/rhadoop/" rel="tag">
            rhadoop
           </a>
           、
           <a href="http://cos.name/tag/r-language/" rel="tag">
            R语言
           </a>
           、
           <a href="http://cos.name/tag/%e6%b5%b7%e9%87%8f%e6%95%b0%e6%8d%ae/" rel="tag">
            海量数据
           </a>
          </span>
          <span class="author vcard">
           <a class="url fn n" href="http://cos.name/author/conan/" rel="author" title="查看所有由张 丹发布的文章">
            张 丹
           </a>
          </span>
         </div>
         <!-- .entry-meta -->
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <h1>
         </h1>
         <p>
          Author：张丹(Conan)
          <br/>
          Date: 2013-03-07
         </p>
         <p>
          Weibo: @Conan_Z
          <br/>
          Email:
          <a href="mailto:bsspirit@gmail.com">
           bsspirit@gmail.com
          </a>
          <br/>
          Blog:
          <a href="http://www.fens.me/blog">
           http://www.fens.me/blog
          </a>
         </p>
         <p>
          APPs:
          <br/>
          @晒粉丝
          <a href="http://www.fens.me">
           http://www.fens.me
          </a>
          <br/>
          @每日中国天气
          <a href="http://apps.weibo.com/chinaweatherapp">
           http://apps.weibo.com/chinaweatherapp
          </a>
         </p>
         <h2>
          RHadoop实践系列文章
         </h2>
         <p>
          RHadoop实践系列文章，包含了R语言与Hadoop结合进行海量数据分析。Hadoop主要用来存储海量数据，R语言完成MapReduce 算法，用来替代Java的MapReduce实现。有了RHadoop可以让广大的R语言爱好者，有更强大的工具处理大数据。1G, 10G, 100G, TB,PB 由于大数据所带来的单机性能问题，可能会一去联复返了。
         </p>
         <p>
          RHadoop实践是一套系列文章，主要包括”Hadoop环境搭建”，”RHadoop安装与使用”，”R实现MapReduce的算法案 例”，”HBase和rhbase的安装与使用”。对于单独的R语言爱好者，Java爱好者，或者Hadoop爱好者来说，同时具备三种语言知识并不容 易。此文虽为入门文章，但R,Java,Hadoop基础知识还是需要大家提前掌握。
          <br/>
          <span id="more-7551">
          </span>
         </p>
         <h2>
          第二篇 RHadoop安装与使用部分，分为3个章节。
         </h2>
         <pre><code>1. 环境准备
2. RHadoop安装
3. RHadoop程序用例
</code></pre>
         <p>
          每一章节，都会分为”文字说明部分”和”代码部分”，保持文字说明与代码的连贯性。
         </p>
         <p>
          注：Hadoop环境搭建的详细记录，请查看 同系列上一篇文章 “RHadoop实践系列文章之Hadoop环境搭建”。
          <br/>
          由于两篇文章并非同一时间所写，hadoop版本及操作系统，分步式环境都略有不同。
          <br/>
          两篇文章相互独立，请大家在理解的基础上动手实验，不要完成依赖两篇文章中的运行命令。
         </p>
         <h2>
          环境准备
         </h2>
         <h4>
          文字说明部分：
         </h4>
         <p>
          首先环境准备，这里我选择了Linux Ubuntu操作系统12.04的64位版本，大家可以根据自己的使用习惯选择顺手的Linux。
         </p>
         <p>
          但JDK一定要用Oracle SUN官方的版本，请从官网下载，操作系统的自带的OpenJDK会有各种不兼容。JDK请选择1.6.x的版本，JDK1.7版本也会有各种的不兼容情况。
          <br/>
          <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">
           http://www.oracle.com/technetwork/java/javase/downloads/index.html
          </a>
         </p>
         <p>
          Hadoop的环境安装，请参考RHadoop实践系统”Hadoop环境搭建”的一文。
         </p>
         <p>
          R语言请安装2.15以后的版本，2.14是不能够支持RHadoop的。
          <br/>
          如果你也使用Linux Ubuntu操作系统12.04，请先更新软件包源，否则只能下载到2.14版本的R。
         </p>
         <h4>
          代码部分：
         </h4>
         <h2>
          1. 操作系统Ubuntu 12.04 x64
         </h2>
         <pre><code>~ uname -a
Linux domU-00-16-3e-00-00-85 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
         <h2>
          2 JAVA环境
         </h2>
         <pre><code>~ java -version

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
</code></pre>
         <h2>
          3 HADOOP环境(这里只需要hadoop)
         </h2>
         <pre><code>hadoop-1.0.3  hbase-0.94.2  hive-0.9.0  pig-0.10.0  sqoop-1.4.2  thrift-0.8.0  zookeeper-3.4.4
</code></pre>
         <h2>
          4 R的环境
         </h2>
         <pre><code>R version 2.15.3 (2013-03-01) -- "Security Blanket"
Copyright (C) 2013 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
</code></pre>
         <h4>
          4.1 如果是Ubuntu 12.04，请更新源再下载R2.15.3版本
         </h4>
         <pre><code>sh -c "echo deb http://mirror.bjtu.edu.cn/cran/bin/linux/ubuntu precise/ &gt;&gt;/etc/apt/sources.list"
apt-get update
apt-get install r-base
</code></pre>
         <h2>
          RHadoop安装
         </h2>
         <h4>
          文字说明部分：
         </h4>
         <p>
          RHadoop是RevolutionAnalytics的工程的项目，开源实现代码在GitHub社区可以找到。RHadoop包含三个R包 (rmr，rhdfs，rhbase)，分别是对应Hadoop系统架构中的，MapReduce, HDFS, HBase 三个部分。由于这三个库不能在CRAN中找到，所以需要自己下载。
          <br/>
          <a href="https://github.com/RevolutionAnalytics/RHadoop/wiki">
           https://github.com/RevolutionAnalytics/RHadoop/wiki
          </a>
         </p>
         <p>
          接下我们需要先安装这三个库的依赖库。
          <br/>
          首先是rJava，上个章节我们已经配置好了JDK1.6的环境，运行R CMD javareconf命令，R的程序从系统变量中会读取Java配置。然后打开R程序，通过install.packages的方式，安装rJava。
         </p>
         <p>
          然后，我还要安装其他的几个依赖库，reshape2，Rcpp，iterators，itertools，digest，RJSONIO，functional，通过install.packages都可以直接安装。
         </p>
         <p>
          接下安装rhdfs库，在环境变量中增加 HADOOP_CMD 和 HADOOP_STREAMING 两个变量，可以用export在当前命令窗口中增加。但为下次方便使用，最好把变量增加到系统环境变更/etc/environment文件中。再用 R CMD INSTALL安装rhdfs包，就可以顺利完成了。
         </p>
         <p>
          安装rmr库，使用R CMD INSTALL也可以顺利完成了。
         </p>
         <p>
          安装rhbase库，后面”HBase和rhbase的安装与使用”文章中会继续介绍，这里暂时跳过。
         </p>
         <p>
          最后，我们可以查看一下，RHADOOP都安装了哪些库。
          <br/>
          由于我的硬盘是外接的，使用mount和软连接(ln -s)挂载了R类库的目录，所以是R的类库在/disk1/system下面
          <br/>
          /disk1/system/usr/local/lib/R/site-library/
          <br/>
          一般R的类库目录是/usr/lib/R/site-library或者/usr/local/lib/R/site-library，用户也可以使用whereis R的命令查询，自己电脑上R类库的安装位置
         </p>
         <h4>
          代码部分：
         </h4>
         <h2>
          1. 下载RHadoop相关的3个程序包
         </h2>
         <p>
          <a href="https://github.com/RevolutionAnalytics/RHadoop/wiki/Downloads">
           https://github.com/RevolutionAnalytics/RHadoop/wiki/Downloads
          </a>
         </p>
         <pre><code>rmr-2.1.0
rhdfs-1.0.5
rhbase-1.1
</code></pre>
         <h2>
          2. 复制到/root/R目录
         </h2>
         <pre><code>~/R# pwd
/root/R

~/R# ls
rhbase_1.1.tar.gz  rhdfs_1.0.5.tar.gz  rmr2_2.1.0.tar.gz
</code></pre>
         <h2>
          3. 安装依赖库
         </h2>
         <pre><code>命令行执行
~ R CMD javareconf 
~ R

启动R程序
install.packages("rJava")
install.packages("reshape2")
install.packages("Rcpp")
install.packages("iterators")
install.packages("itertools")
install.packages("digest")
install.packages("RJSONIO")
install.packages("functional")
</code></pre>
         <h2>
          4. 安装rhdfs库
         </h2>
         <pre><code>~ export HADOOP_CMD=/root/hadoop/hadoop-1.0.3/bin/hadoop
~ export HADOOP_STREAMING=/root/hadoop/hadoop-1.0.3/contrib/streaming/hadoop-streaming-1.0.3.jar (rmr2会用到)
~ R CMD INSTALL /root/R/rhdfs_1.0.5.tar.gz 
</code></pre>
         <h4>
          4.1 最好把HADOOP_CMD设置到环境变量
         </h4>
         <pre><code>~ vi /etc/environment

    HADOOP_CMD=/root/hadoop/hadoop-1.0.3/bin/hadoop
    HADOOP_STREAMING=/root/hadoop/hadoop-1.0.3/contrib/streaming/hadoop-streaming-1.0.3.jar

. /etc/environment
</code></pre>
         <h2>
          5. 安装rmr库
         </h2>
         <pre><code>~  R CMD INSTALL rmr2_2.1.0.tar.gz 
</code></pre>
         <h2>
          6. 安装rhbase库 (暂时跳过)
         </h2>
         <h2>
          7. 所有的安装包
         </h2>
         <pre><code>~ ls /disk1/system/usr/local/lib/R/site-library/
digest  functional  iterators  itertools  plyr  Rcpp  reshape2  rhdfs  rJava  RJSONIO  rmr2  stringr
</code></pre>
         <h2>
          RHadoop程序用例
         </h2>
         <h4>
          文字说明部分：
         </h4>
         <p>
          安装好rhdfs和rmr两个包后，我们就可以使用R尝试一些hadoop的操作了。
         </p>
         <p>
          首先，是基本的hdfs的文件操作。
         </p>
         <p>
          查看hdfs文件目录
          <br/>
          hadoop的命令：hadoop fs -ls /user
          <br/>
          R语言函数：hdfs.ls(”/user/“)
         </p>
         <p>
          查看hadoop数据文件
          <br/>
          hadoop的命令：hadoop fs -cat /user/hdfs/o_same_school/part-m-00000
          <br/>
          R语言函数：hdfs.cat(”/user/hdfs/o_same_school/part-m-00000″)
         </p>
         <p>
          接下来，我们执行一个rmr算法的任务
         </p>
         <p>
          普通的R语言程序：
         </p>
         <pre><code>&gt; small.ints = 1:10
&gt; sapply(small.ints, function(x) x^2)
</code></pre>
         <p>
          MapReduce的R语言程序：
         </p>
         <pre><code>&gt; small.ints = to.dfs(1:10)
&gt; mapreduce(input = small.ints, map = function(k, v) cbind(v, v^2))
&gt; from.dfs("/tmp/RtmpWnzxl4/file5deb791fcbd5")
</code></pre>
         <p>
          因为MapReduce只能访问HDFS文件系统，先要用to.dfs把数据存储到HDFS文件系统里。MapReduce的运算结果再用from.dfs函数从HDFS文件系统中取出。
         </p>
         <p>
          第二个，rmr的例子是wordcount，对文件中的单词计数
         </p>
         <pre><code>&gt; input&lt;- '/user/hdfs/o_same_school/part-m-00000'
&gt; wordcount = function(input, output = NULL, pattern = " "){

  wc.map = function(., lines) {
            keyval(unlist( strsplit( x = lines,split = pattern)),1)
    }

    wc.reduce =function(word, counts ) {
            keyval(word, sum(counts))
    }         

    mapreduce(input = input ,output = output, input.format = "text",
        map = wc.map, reduce = wc.reduce,combine = T)
}

&gt; wordcount(input)
&gt; from.dfs("/tmp/RtmpfZUFEa/file6cac626aa4a7")
</code></pre>
         <p>
          我在HDFS上提前放置了数据文件/user/hdfs/o_same_school/part-m-00000。写wordcount的MapReduce函数，执行wordcount函数，最后用from.dfs从HDFS中取得结果。
         </p>
         <h4>
          代码部分：
         </h4>
         <h2>
          1. rhdfs包的使用
         </h2>
         <pre><code>启动R程序
&gt; library(rhdfs)

Loading required package: rJava
HADOOP_CMD=/root/hadoop/hadoop-1.0.3/bin/hadoop
Be sure to run hdfs.init()

&gt; hdfs.init()
</code></pre>
         <h2>
          1.1 命令查看hadoop目录
         </h2>
         <pre><code>~ hadoop fs -ls /user

Found 4 items
drwxr-xr-x   - root supergroup          0 2013-02-01 12:15 /user/conan
drwxr-xr-x   - root supergroup          0 2013-03-06 17:24 /user/hdfs
drwxr-xr-x   - root supergroup          0 2013-02-26 16:51 /user/hive
drwxr-xr-x   - root supergroup          0 2013-03-06 17:21 /user/root
</code></pre>
         <h2>
          1.2 rhdfs查看hadoop目录
         </h2>
         <pre><code>&gt; hdfs.ls("/user/")

  permission owner      group size          modtime        file
1 drwxr-xr-x  root supergroup    0 2013-02-01 12:15 /user/conan
2 drwxr-xr-x  root supergroup    0 2013-03-06 17:24  /user/hdfs
3 drwxr-xr-x  root supergroup    0 2013-02-26 16:51  /user/hive
4 drwxr-xr-x  root supergroup    0 2013-03-06 17:21  /user/root
</code></pre>
         <h2>
          1.3 命令查看hadoop数据文件
         </h2>
         <pre><code>~ hadoop fs -cat /user/hdfs/o_same_school/part-m-00000

10,3,tsinghua university,2004-05-26 15:21:00.0
23,4007,北京第一七一中学,2004-05-31 06:51:53.0
51,4016,大连理工大学,2004-05-27 09:38:31.0
89,4017,Amherst College,2004-06-01 16:18:56.0
92,4017,斯坦福大学,2012-11-28 10:33:25.0
99,4017,Stanford University Graduate School of Business,2013-02-19 12:17:15.0
113,4017,Stanford University,2013-02-19 12:17:15.0
123,4019,St Paul's Co-educational College - Hong Kong,2004-05-27 18:04:17.0
138,4019,香港苏浙小学,2004-05-27 18:59:58.0
172,4020,University,2004-05-27 19:14:34.0
182,4026,ff,2004-05-28 04:42:37.0
183,4026,ff,2004-05-28 04:42:37.0
189,4033,tsinghua,2011-09-14 12:00:38.0
195,4035,ba,2004-05-31 07:10:24.0
196,4035,ma,2004-05-31 07:10:24.0
197,4035,southampton university,2013-01-07 15:35:18.0
246,4067,美国史丹佛大学,2004-06-12 10:42:10.0
254,4067,美国史丹佛大学,2004-06-12 10:42:10.0
255,4067,美国休士顿大学,2004-06-12 10:42:10.0
257,4068,清华大学,2004-06-12 10:42:10.0
258,4068,北京八中,2004-06-12 17:34:02.0
262,4068,香港中文大学,2004-06-12 17:34:02.0
310,4070,首都师范大学初等教育学院,2004-06-14 15:35:52.0
312,4070,北京师范大学经济学院,2004-06-14 15:35:52.0
</code></pre>
         <h2>
          1.4 rhdfs查看hadoop数据文件
         </h2>
         <pre><code>&gt;  hdfs.cat("/user/hdfs/o_same_school/part-m-00000")

 [1] "10,3,tsinghua university,2004-05-26 15:21:00.0"
 [2] "23,4007,北京第一七一中学,2004-05-31 06:51:53.0"
 [3] "51,4016,大连理工大学,2004-05-27 09:38:31.0"
 [4] "89,4017,Amherst College,2004-06-01 16:18:56.0"
 [5] "92,4017,斯坦福大学,2012-11-28 10:33:25.0"
 [6] "99,4017,Stanford University Graduate School of Business,2013-02-19 12:17:15.0"
 [7] "113,4017,Stanford University,2013-02-19 12:17:15.0"
 [8] "123,4019,St Paul's Co-educational College - Hong Kong,2004-05-27 18:04:17.0"
 [9] "138,4019,香港苏浙小学,2004-05-27 18:59:58.0"
[10] "172,4020,University,2004-05-27 19:14:34.0"
[11] "182,4026,ff,2004-05-28 04:42:37.0"
[12] "183,4026,ff,2004-05-28 04:42:37.0"
[13] "189,4033,tsinghua,2011-09-14 12:00:38.0"
[14] "195,4035,ba,2004-05-31 07:10:24.0"
[15] "196,4035,ma,2004-05-31 07:10:24.0"
[16] "197,4035,southampton university,2013-01-07 15:35:18.0"
[17] "246,4067,美国史丹佛大学,2004-06-12 10:42:10.0"
[18] "254,4067,美国史丹佛大学,2004-06-12 10:42:10.0"
[19] "255,4067,美国休士顿大学,2004-06-12 10:42:10.0"
[20] "257,4068,清华大学,2004-06-12 10:42:10.0"
[21] "258,4068,北京八中,2004-06-12 17:34:02.0"
[22] "262,4068,香港中文大学,2004-06-12 17:34:02.0"
[23] "310,4070,首都师范大学初等教育学院,2004-06-14 15:35:52.0"
[24] "312,4070,北京师范大学经济学院,2004-06-14 15:35:52.0"
</code></pre>
         <h2>
          2. rmr2包的使用
         </h2>
         <pre><code>启动R程序
&gt; library(rmr2)

Loading required package: Rcpp
Loading required package: RJSONIO
Loading required package: digest
Loading required package: functional
Loading required package: stringr
Loading required package: plyr
Loading required package: reshape2
</code></pre>
         <h2>
          2.1 执行r任务
         </h2>
         <pre><code>&gt; small.ints = 1:10
&gt; sapply(small.ints, function(x) x^2)

[1]   1   4   9  16  25  36  49  64  81 100
</code></pre>
         <h2>
          2.2 执行rmr2任务
         </h2>
         <pre><code>&gt; small.ints = to.dfs(1:10)

13/03/07 12:12:55 INFO util.NativeCodeLoader: Loaded the native-hadoop library
13/03/07 12:12:55 INFO zlib.ZlibFactory: Successfully loaded &amp; initialized native-zlib library
13/03/07 12:12:55 INFO compress.CodecPool: Got brand-new compressor

&gt; mapreduce(input = small.ints, map = function(k, v) cbind(v, v^2))

packageJobJar: [/tmp/RtmpWnzxl4/rmr-local-env5deb2b300d03, /tmp/RtmpWnzxl4/rmr-global-env5deb398a522b, /tmp/RtmpWnzxl4/rmr-streaming-map5deb1552172d, /root/hadoop/tmp/hadoop-unjar7838617732558795635/] [] /tmp/streamjob4380275136001813619.jar tmpDir=null
13/03/07 12:12:59 INFO mapred.FileInputFormat: Total input paths to process : 1
13/03/07 12:12:59 INFO streaming.StreamJob: getLocalDirs(): [/root/hadoop/tmp/mapred/local]
13/03/07 12:12:59 INFO streaming.StreamJob: Running job: job_201302261738_0293
13/03/07 12:12:59 INFO streaming.StreamJob: To kill this job, run:
13/03/07 12:12:59 INFO streaming.StreamJob: /disk1/hadoop/hadoop-1.0.3/libexec/../bin/hadoop job  -Dmapred.job.tracker=hdfs://r.qa.tianji.com:9001 -kill job_201302261738_0293
13/03/07 12:12:59 INFO streaming.StreamJob: Tracking URL: http://192.168.1.243:50030/jobdetails.jsp?jobid=job_201302261738_0293
13/03/07 12:13:00 INFO streaming.StreamJob:  map 0%  reduce 0%
13/03/07 12:13:15 INFO streaming.StreamJob:  map 100%  reduce 0%
13/03/07 12:13:21 INFO streaming.StreamJob:  map 100%  reduce 100%
13/03/07 12:13:21 INFO streaming.StreamJob: Job complete: job_201302261738_0293
13/03/07 12:13:21 INFO streaming.StreamJob: Output: /tmp/RtmpWnzxl4/file5deb791fcbd5

&gt; from.dfs("/tmp/RtmpWnzxl4/file5deb791fcbd5")

$key
NULL

$val
       v
 [1,]  1   1
 [2,]  2   4
 [3,]  3   9
 [4,]  4  16
 [5,]  5  25
 [6,]  6  36
 [7,]  7  49
 [8,]  8  64
 [9,]  9  81
[10,] 10 100
</code></pre>
         <h2>
          2.3 wordcount执行rmr2任务
         </h2>
         <pre><code>&gt; input&lt;- '/user/hdfs/o_same_school/part-m-00000'
&gt; wordcount = function(input, output = NULL, pattern = " "){

    wc.map = function(., lines) {
            keyval(unlist( strsplit( x = lines,split = pattern)),1)
    }

    wc.reduce =function(word, counts ) {
            keyval(word, sum(counts))
    }         

    mapreduce(input = input ,output = output, input.format = "text",
        map = wc.map, reduce = wc.reduce,combine = T)
}

&gt; wordcount(input)

packageJobJar: [/tmp/RtmpfZUFEa/rmr-local-env6cac64020a8f, /tmp/RtmpfZUFEa/rmr-global-env6cac73016df3, /tmp/RtmpfZUFEa/rmr-streaming-map6cac7f145e02, /tmp/RtmpfZUFEa/rmr-streaming-reduce6cac238dbcf, /tmp/RtmpfZUFEa/rmr-streaming-combine6cac2b9098d4, /root/hadoop/tmp/hadoop-unjar6584585621285839347/] [] /tmp/streamjob9195921761644130661.jar tmpDir=null
13/03/07 12:34:41 INFO util.NativeCodeLoader: Loaded the native-hadoop library
13/03/07 12:34:41 WARN snappy.LoadSnappy: Snappy native library not loaded
13/03/07 12:34:41 INFO mapred.FileInputFormat: Total input paths to process : 1
13/03/07 12:34:41 INFO streaming.StreamJob: getLocalDirs(): [/root/hadoop/tmp/mapred/local]
13/03/07 12:34:41 INFO streaming.StreamJob: Running job: job_201302261738_0296
13/03/07 12:34:41 INFO streaming.StreamJob: To kill this job, run:
13/03/07 12:34:41 INFO streaming.StreamJob: /disk1/hadoop/hadoop-1.0.3/libexec/../bin/hadoop job  -Dmapred.job.tracker=hdfs://r.qa.tianji.com:9001 -kill job_201302261738_0296
13/03/07 12:34:41 INFO streaming.StreamJob: Tracking URL: http://192.168.1.243:50030/jobdetails.jsp?jobid=job_201302261738_0296
13/03/07 12:34:42 INFO streaming.StreamJob:  map 0%  reduce 0%
13/03/07 12:34:59 INFO streaming.StreamJob:  map 100%  reduce 0%
13/03/07 12:35:08 INFO streaming.StreamJob:  map 100%  reduce 17%
13/03/07 12:35:14 INFO streaming.StreamJob:  map 100%  reduce 100%
13/03/07 12:35:20 INFO streaming.StreamJob: Job complete: job_201302261738_0296
13/03/07 12:35:20 INFO streaming.StreamJob: Output: /tmp/RtmpfZUFEa/file6cac626aa4a7

&gt; from.dfs("/tmp/RtmpfZUFEa/file6cac626aa4a7")

$key
 [1] "-"
 [2] "04:42:37.0"
 [3] "06:51:53.0"
 [4] "07:10:24.0"
 [5] "09:38:31.0"
 [6] "10:33:25.0"
 [7] "10,3,tsinghua"
 [8] "10:42:10.0"
 [9] "113,4017,Stanford"
[10] "12:00:38.0"
[11] "12:17:15.0"
[12] "123,4019,St"
[13] "138,4019,香港苏浙小学,2004-05-27"
[14] "15:21:00.0"
[15] "15:35:18.0"
[16] "15:35:52.0"
[17] "16:18:56.0"
[18] "172,4020,University,2004-05-27"
[19] "17:34:02.0"
[20] "18:04:17.0"
[21] "182,4026,ff,2004-05-28"
[22] "183,4026,ff,2004-05-28"
[23] "18:59:58.0"
[24] "189,4033,tsinghua,2011-09-14"
[25] "19:14:34.0"
[26] "195,4035,ba,2004-05-31"
[27] "196,4035,ma,2004-05-31"
[28] "197,4035,southampton"
[29] "23,4007,北京第一七一中学,2004-05-31"
[30] "246,4067,美国史丹佛大学,2004-06-12"
[31] "254,4067,美国史丹佛大学,2004-06-12"
[32] "255,4067,美国休士顿大学,2004-06-12"
[33] "257,4068,清华大学,2004-06-12"
[34] "258,4068,北京八中,2004-06-12"
[35] "262,4068,香港中文大学,2004-06-12"
[36] "312,4070,北京师范大学经济学院,2004-06-14"
[37] "51,4016,大连理工大学,2004-05-27"
[38] "89,4017,Amherst"
[39] "92,4017,斯坦福大学,2012-11-28"
[40] "99,4017,Stanford"
[41] "Business,2013-02-19"
[42] "Co-educational"
[43] "College"
[44] "College,2004-06-01"
[45] "Graduate"
[46] "Hong"
[47] "Kong,2004-05-27"
[48] "of"
[49] "Paul's"
[50] "School"
[51] "University"
[52] "university,2004-05-26"
[53] "university,2013-01-07"
[54] "University,2013-02-19"
[55] "310,4070,首都师范大学初等教育学院,2004-06-14"

$val
 [1] 1 2 1 2 1 1 1 4 1 1 2 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
</code></pre>
         <div class="wumii-hook">
          <br/>
          <br/>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <nav class="navigation post-navigation" role="navigation">
        <h1 class="screen-reader-text">
         文章导航
        </h1>
        <div class="nav-links">
         <a href="http://cos.name/2013/03/rhadoop1-hadoop/" rel="prev">
          <span class="meta-nav">
           ←
          </span>
          RHadoop实践系列之一:Hadoop环境搭建
         </a>
         <a href="http://cos.name/2013/03/garden-of-ditributions-of-r/" rel="next">
          COS每周精选:R的概率分布花园
          <span class="meta-nav">
           →
          </span>
         </a>
        </div>
        <!-- .nav-links -->
       </nav>
       <!-- .navigation -->
       <div class="comments-area" id="comments">
        <h2 class="comments-title">
         《
         <span>
          RHadoop实践系列之二：RHadoop安装与使用
         </span>
         》有119个想法
        </h2>
        <ol class="comment-list">
         <li class="comment even thread-even depth-1" id="comment-3862">
          <article class="comment-body" id="div-comment-3862">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/d206182c5ff0e4dcdaf13c3784e6b162?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Xuanr
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3862">
              <time datetime="2013-03-25T11:11:37+00:00">
               2013/03/25 11:11
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             很有帮助的文章，赞一个。。。
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Xuanr" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3862#respond" onclick='return addComment.moveForm( "div-comment-3862", "3862", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-3868">
          <article class="comment-body" id="div-comment-3868">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/6301399d6c22ebc3a63b1cd9a1301faf?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              xpjiang
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3868">
              <time datetime="2013-03-26T04:38:38+00:00">
               2013/03/26 04:38
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             非常感谢！十分有帮助！
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给xpjiang" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3868#respond" onclick='return addComment.moveForm( "div-comment-3868", "3868", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1" id="comment-3872">
          <article class="comment-body" id="div-comment-3872">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/89a83817420e71bcc0e8bc672e217d49?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Li Zhong
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3872">
              <time datetime="2013-03-27T23:33:42+00:00">
               2013/03/27 23:33
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             非常感谢！十分有帮助！
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Li Zhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3872#respond" onclick='return addComment.moveForm( "div-comment-3872", "3872", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-3940">
          <article class="comment-body" id="div-comment-3940">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/58c365b91fd40f2dcff339055f8046bb?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              qiaohaijun
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3940">
              <time datetime="2013-04-08T21:08:56+00:00">
               2013/04/08 21:08
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             非常感谢，很有用
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给qiaohaijun" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3940#respond" onclick='return addComment.moveForm( "div-comment-3940", "3940", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-3968">
          <article class="comment-body" id="div-comment-3968">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/571dec833e4d53bfc89095658d76c927?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              ada
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3968">
              <time datetime="2013-04-11T18:00:49+00:00">
               2013/04/11 18:00
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             hdfs.cat，to.dfs，from.dfs等函数执行都没有问题，但是执行mapreduce函数时总是提示错误：sh: -input: command not found
             <br/>
             Error in mr(map = map, reduce = reduce, reduceondataframe = reduceondataframe,  :  hadoop streaming failed with error code 127
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给ada" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3968#respond" onclick='return addComment.moveForm( "div-comment-3968", "3968", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2 parent" id="comment-3972">
            <article class="comment-body" id="div-comment-3972">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3972">
                <time datetime="2013-04-12T09:42:22+00:00">
                 2013/04/12 09:42
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               请确认环境变量中，是否已经有了HADOOP_STREAMING！
              </p>
              <p>
               上文中环境变量：
               <br/>
               ~ export HADOOP_STREAMING=/root/hadoop/hadoop-1.0.3/contrib/streaming/hadoop-streaming-1.0.3.jar (rmr2会用到)
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=3972#respond" onclick='return addComment.moveForm( "div-comment-3972", "3972", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3" id="comment-3978">
              <article class="comment-body" id="div-comment-3978">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/571dec833e4d53bfc89095658d76c927?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  ada
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3978">
                  <time datetime="2013-04-12T15:22:55+00:00">
                   2013/04/12 15:22
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 已经设置了，还不是不行。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-3979">
              <article class="comment-body" id="div-comment-3979">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/571dec833e4d53bfc89095658d76c927?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  ada
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3979">
                  <time datetime="2013-04-12T15:23:52+00:00">
                   2013/04/12 15:23
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 还是不行
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-3980">
              <article class="comment-body" id="div-comment-3980">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3980">
                  <time datetime="2013-04-12T15:26:21+00:00">
                   2013/04/12 15:26
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 你能把你的 “程序代码”，“错误日志”，“系统环境”，完整的写出来吗？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-3987">
              <article class="comment-body" id="div-comment-3987">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/571dec833e4d53bfc89095658d76c927?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  ada
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3987">
                  <time datetime="2013-04-12T15:55:22+00:00">
                   2013/04/12 15:55
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 代码就是上文中您的示例mapreduce(input = ‘/user/rtest01’, map = function(k, v) cbind(v, v^2))，错误提示是sh: -input: command not found
                 <br/>
                 Error in mr(map = map, reduce = reduce, reduceondataframe = reduceondataframe, : hadoop streaming failed with error code 127.
                 <br/>
                 另外，操作系统是centos 6.3，hadoop的版本是Hadoop 2.0.0-cdh4.1.2，以及jdk1.6.0_30。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-3988">
              <article class="comment-body" id="div-comment-3988">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3988">
                  <time datetime="2013-04-12T16:25:58+00:00">
                   2013/04/12 16:25
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 input = ‘/user/rtest01′，能输出一下吗？
                 <br/>
                 function(k, v) cbind(v, v^2))，是对数字做平方操作，不能处理文本内容。
                </p>
                <p>
                 请再次确认一下。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3" id="comment-3998">
              <article class="comment-body" id="div-comment-3998">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/571dec833e4d53bfc89095658d76c927?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  ada
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-3998">
                  <time datetime="2013-04-15T10:54:16+00:00">
                   2013/04/15 10:54
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 rtest01的内容就是通过to.dfs(1:10,’/user/rtest01′)写入的。函数from.dfs(‘/user/rtest01’)的执行结果：
                 <br/>
                 [[1]]
                 <br/>
                 [[1]]$key
                 <br/>
                 NULL
                </p>
                <p>
                 [[1]]$val
                 <br/>
                 [1] 1
                </p>
                <p>
                 attr(,”rmr.keyval”)
                 <br/>
                 [1] TRUE
                </p>
                <p>
                 [[2]]
                 <br/>
                 [[2]]$key
                 <br/>
                 NULL
                </p>
                <p>
                 [[2]]$val
                 <br/>
                 [1] 2
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-4072">
          <article class="comment-body" id="div-comment-4072">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/82ef68f991608319b1a1ecd18f80a13e?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              影
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4072">
              <time datetime="2013-04-22T13:41:42+00:00">
               2013/04/22 13:41
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             不好意思
             <br/>
             想請問您一個問題
             <br/>
             當我前置作業都已完成後
             <br/>
             我想要安裝rhdfs R CMD INSTALL /root/R/rhdfs_1.0.5.tar.gz
             <br/>
             但系統會出現下列警告
             <br/>
             ERROR: dependency ‘rJava’ is not available for package ‘rhdfs’
             <br/>
             請問這是什麼問題呢??
             <br/>
             麻煩您幫我解答一下
             <br/>
             謝謝
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给影" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4072#respond" onclick='return addComment.moveForm( "div-comment-4072", "4072", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2 parent" id="comment-4073">
            <article class="comment-body" id="div-comment-4073">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4073">
                <time datetime="2013-04-22T13:53:29+00:00">
                 2013/04/22 13:53
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               rJava，你还没有安装或者安装失败，rhdfs对rJava有依赖。请按照操作步骤执行。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4073#respond" onclick='return addComment.moveForm( "div-comment-4073", "4073", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3 parent" id="comment-4074">
              <article class="comment-body" id="div-comment-4074">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/82ef68f991608319b1a1ecd18f80a13e?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  影
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4074">
                  <time datetime="2013-04-22T14:48:06+00:00">
                   2013/04/22 14:48
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 您好:
                </p>
                <p>
                 我想我應該找到原因了
                 <br/>
                 因為我的R的版本只有2.13.1
                 <br/>
                 導致許多東西裝不上去
                 <br/>
                 想請問一下我該如何更新R的版本呢??
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor odd alt depth-3" id="comment-4075">
              <article class="comment-body" id="div-comment-4075">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4075">
                  <time datetime="2013-04-22T15:35:05+00:00">
                   2013/04/22 15:35
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 正文中有写：
                 <br/>
                 “4.1 如果是Ubuntu 12.04，请更新源再下载R2.15.3版本”
                </p>
                <p>
                 其他的系统你要自己解决了。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment even depth-3" id="comment-4077">
              <article class="comment-body" id="div-comment-4077">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/82ef68f991608319b1a1ecd18f80a13e?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  影
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4077">
                  <time datetime="2013-04-22T19:47:41+00:00">
                   2013/04/22 19:47
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 好的!!
                 <br/>
                 我在嘗試看看
                 <br/>
                 謝謝您的回答
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-4102">
          <article class="comment-body" id="div-comment-4102">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              dongguozhong
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4102">
              <time datetime="2013-04-27T19:54:23+00:00">
               2013/04/27 19:54
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             Job not successful. Error: # of failed Map Tasks exceeded allowed limit
            </p>
            <p>
             这是什么问题啊 我ulimit -n 已经65536了，谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给dongguozhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4102#respond" onclick='return addComment.moveForm( "div-comment-4102", "4102", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor even depth-2 parent" id="comment-4103">
            <article class="comment-body" id="div-comment-4103">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4103">
                <time datetime="2013-04-27T22:05:38+00:00">
                 2013/04/27 22:05
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               你这个错误是hadoop本身的，不是R语言引起的。
               <br/>
               你同样写个JAVA程序应该也会有这个错误。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4103#respond" onclick='return addComment.moveForm( "div-comment-4103", "4103", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3 parent" id="comment-4104">
              <article class="comment-body" id="div-comment-4104">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  dongguozhong
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4104">
                  <time datetime="2013-04-27T22:17:30+00:00">
                   2013/04/27 22:17
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 Caused by: java.io.IOException: Cannot run program “Rscript”: java.io.IOException: error=13, Permission denied
                 <br/>
                 at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
                </p>
                <p>
                 有提示这个，是不是不能调用R
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4106">
              <article class="comment-body" id="div-comment-4106">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4106">
                  <time datetime="2013-04-28T10:21:29+00:00">
                   2013/04/28 10:21
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 你在执行什么操作的时候，出现这个错误呢? rmr2? rhdfs?
                </p>
                <p>
                 1. 先确认Java程序，是不是运行都正常。
                 <br/>
                 2. 如果是rmr2，看本地环境的/usr/bin/R，/usr/bin/Rscript，是不是装好了，thrift是不是装好了？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-4107">
              <article class="comment-body" id="div-comment-4107">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  dongguozhong
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4107">
                  <time datetime="2013-04-28T10:31:57+00:00">
                   2013/04/28 10:31
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 1.JAVA程序运行正常
                 <br/>
                 2.根据您文档前面所有运行都可以，执行wordcount的时候提示
                 <br/>
                 packageJobJar: [/tmp/RtmpSbSXJC/rmr-local-env2c932a90e626, /tmp/RtmpSbSXJC/rmr-global-env2c937efce0c2, /tmp/RtmpSbSXJC/rmr-streaming-map2c9359dcb07d, /tmp/RtmpSbSXJC/rmr-streaming-reduce2c93f412d85, /tmp/RtmpSbSXJC/rmr-streaming-combine2c9312b57f78, /home/hadoop_tmp/hadoop-unjar3036903685334201444/] [] /tmp/streamjob2684192384705100214.jar tmpDir=null
                 <br/>
                 13/04/28 10:07:05 INFO util.NativeCodeLoader: Loaded the native-hadoop library
                 <br/>
                 13/04/28 10:07:05 WARN snappy.LoadSnappy: Snappy native library not loaded
                 <br/>
                 13/04/28 10:07:05 INFO mapred.FileInputFormat: Total input paths to process : 1
                 <br/>
                 13/04/28 10:07:08 INFO streaming.StreamJob: getLocalDirs(): [/home/hadoop_tmp/mapred/local]
                 <br/>
                 13/04/28 10:07:08 INFO streaming.StreamJob: Running job: job_201304272135_0004
                 <br/>
                 13/04/28 10:07:08 INFO streaming.StreamJob: To kill this job, run:
                 <br/>
                 13/04/28 10:07:08 INFO streaming.StreamJob: /hadoop/conan/hadoop-1.0.4/libexec/../bin/hadoop job  -Dmapred.job.tracker=172.16.19.241:9001 -kill job_201304272135_0004
                 <br/>
                 13/04/28 10:07:08 INFO streaming.StreamJob: Tracking URL:
                 <a href="http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004" rel="nofollow">
                  http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004
                 </a>
                 <br/>
                 13/04/28 10:07:09 INFO streaming.StreamJob:  map 0%  reduce 0%
                 <br/>
                 13/04/28 10:08:42 INFO streaming.StreamJob:  map 100%  reduce 100%
                 <br/>
                 13/04/28 10:08:42 INFO streaming.StreamJob: To kill this job, run:
                 <br/>
                 13/04/28 10:08:42 INFO streaming.StreamJob: /hadoop/conan/hadoop-1.0.4/libexec/../bin/hadoop job  -Dmapred.job.tracker=172.16.19.241:9001 -kill job_201304272135_0004
                 <br/>
                 13/04/28 10:08:42 INFO streaming.StreamJob: Tracking URL:
                 <a href="http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004" rel="nofollow">
                  http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004
                 </a>
                 <br/>
                 13/04/28 10:08:42 ERROR streaming.StreamJob: Job not successful. Error: # of failed Map Tasks exceeded allowed limit. FailedCount: 1. LastFailedTask: task_201304272135_0004_m_000000
                 <br/>
                 13/04/28 10:08:42 INFO streaming.StreamJob: killJob…
                 <br/>
                 Streaming Command Failed!
                 <br/>
                 Error in mr(map = map, reduce = reduce, combine = combine, vectorized.reduce,  :
                 <br/>
                 hadoop streaming failed with error code 1
                 <br/>
                 Deleted hdfs://172.16.19.241:9000/tmp/RtmpSbSXJC/file2c9328dd6066
                 <br/>
                 我的/usr/bin/R，/usr/bin/Rscript在namenode上都安装了，但是thrift根据你的文档里没有写，就没有安装，怎么安装
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4111">
              <article class="comment-body" id="div-comment-4111">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4111">
                  <time datetime="2013-04-28T12:36:49+00:00">
                   2013/04/28 12:36
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 这步操作thrift不用装。
                </p>
                <p>
                 你能把tracking日志都打印出来吗？找到准确的异常信息！
                 <br/>
                 <a href="http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004" rel="nofollow">
                  http://namenode.local:50030/jobdetails.jsp?jobid=job_201304272135_0004
                 </a>
                </p>
                <p>
                 这个异常只是告诉你map重试次数过多，看不出来问题。
                 <br/>
                 ERROR streaming.StreamJob: Job not successful. Error: # of failed Map Tasks exceeded allowed limit. FailedCount: 1
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-4108">
          <article class="comment-body" id="div-comment-4108">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              dongguozhong
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4108">
              <time datetime="2013-04-28T10:36:36+00:00">
               2013/04/28 10:36
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             还有本篇文章的实例需要安装第六步中的rhbase么
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给dongguozhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4108#respond" onclick='return addComment.moveForm( "div-comment-4108", "4108", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor even depth-2" id="comment-4110">
            <article class="comment-body" id="div-comment-4110">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4110">
                <time datetime="2013-04-28T12:25:20+00:00">
                 2013/04/28 12:25
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               本例不需要rhbase，rhbase部分请参考
               <br/>
               <a href="http://cos.name/2013/04/rhadoop4-rhbase/" rel="nofollow">
                http://cos.name/2013/04/rhadoop4-rhbase/
               </a>
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4110#respond" onclick='return addComment.moveForm( "div-comment-4110", "4110", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-4112">
          <article class="comment-body" id="div-comment-4112">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              dongguozhong
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4112">
              <time datetime="2013-04-28T15:49:16+00:00">
               2013/04/28 15:49
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             java.lang.RuntimeException: Error in configuring object
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
             <br/>
             at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:432)
             <br/>
             at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
             <br/>
             at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
             <br/>
             at java.security.AccessController.doPrivileged(Native Method)
             <br/>
             at javax.security.auth.Subject.doAs(Subject.java:396)
             <br/>
             at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
             <br/>
             at org.apache.hadoop.mapred.Child.main(Child.java:249)
             <br/>
             Caused by: java.lang.reflect.InvocationTargetException
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             <br/>
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             <br/>
             at java.lang.reflect.Method.invoke(Method.java:597)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
             <br/>
             … 9 more
             <br/>
             Caused by: java.lang.RuntimeException: Error in configuring object
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
             <br/>
             at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
             <br/>
             … 14 more
             <br/>
             Caused by: java.lang.reflect.InvocationTargetException
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             <br/>
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             <br/>
             at java.lang.reflect.Method.invoke(Method.java:597)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
             <br/>
             … 17 more
             <br/>
             Caused by: java.lang.RuntimeException: configuration exception
             <br/>
             at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:230)
             <br/>
             at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66)
             <br/>
             … 22 more
             <br/>
             Caused by: java.io.IOException: Cannot run program “Rscript”: java.io.IOException: error=2, No such file or directory
             <br/>
             at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
             <br/>
             at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214)
             <br/>
             … 23 more
             <br/>
             Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
             <br/>
             at java.lang.UNIXProcess.(UNIXProcess.java:148)
             <br/>
             at java.lang.ProcessImpl.start(ProcessImpl.java:65)
             <br/>
             at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
            </p>
            <p>
             这种情况是不是我datanode上的R环境没有安装好
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给dongguozhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4112#respond" onclick='return addComment.moveForm( "div-comment-4112", "4112", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-6817">
            <article class="comment-body" id="div-comment-6817">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/6402e62ebcf24dd1d1d15629e69ff350?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                xusure
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6817">
                <time datetime="2015-08-19T10:12:05+00:00">
                 2015/08/19 10:12
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               兄弟你是怎么解决的啊，我也遇到了这个问题，纠结了我好几天了
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给xusure" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6817#respond" onclick='return addComment.moveForm( "div-comment-6817", "6817", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-4113">
          <article class="comment-body" id="div-comment-4113">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              dongguozhong
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4113">
              <time datetime="2013-04-28T15:51:41+00:00">
               2013/04/28 15:51
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             java.lang.RuntimeException: Error in configuring object
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
             <br/>
             at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:432)
             <br/>
             at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
             <br/>
             at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
             <br/>
             at java.security.AccessController.doPrivileged(Native Method)
             <br/>
             at javax.security.auth.Subject.doAs(Subject.java:396)
             <br/>
             at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
             <br/>
             at org.apache.hadoop.mapred.Child.main(Child.java:249)
             <br/>
             Caused by: java.lang.reflect.InvocationTargetException
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             <br/>
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             <br/>
             at java.lang.reflect.Method.invoke(Method.java:597)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
             <br/>
             … 9 more
             <br/>
             Caused by: java.lang.RuntimeException: Error in configuring object
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
             <br/>
             at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
             <br/>
             … 14 more
             <br/>
             Caused by: java.lang.reflect.InvocationTargetException
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             <br/>
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             <br/>
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             <br/>
             at java.lang.reflect.Method.invoke(Method.java:597)
             <br/>
             at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
             <br/>
             … 17 more
             <br/>
             Caused by: java.lang.RuntimeException: configuration exception
             <br/>
             at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:230)
             <br/>
             at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66)
             <br/>
             … 22 more
             <br/>
             Caused by: java.io.IOException: Cannot run program “Rscript”: java.io.IOException: error=2, No such file or directory
             <br/>
             at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
             <br/>
             at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214)
             <br/>
             … 23 more
             <br/>
             Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
             <br/>
             at java.lang.UNIXProcess.(UNIXProcess.java:148)
             <br/>
             at java.lang.ProcessImpl.start(ProcessImpl.java:65)
             <br/>
             at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
            </p>
            <p>
             这种情况 是我datanode上的R环境没有安装好么，datanode上所有的配置需要和namenode一致，是么
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给dongguozhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4113#respond" onclick='return addComment.moveForm( "div-comment-4113", "4113", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2 parent" id="comment-4115">
            <article class="comment-body" id="div-comment-4115">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/388b8c710be69b3859436cacffdafcb2?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                dongguozhong
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4115">
                <time datetime="2013-04-28T16:39:19+00:00">
                 2013/04/28 16:39
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               问题解决了，是datanode的问题，谢谢您耐心回答
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给dongguozhong" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4115#respond" onclick='return addComment.moveForm( "div-comment-4115", "4115", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment byuser comment-author-conan bypostauthor odd alt depth-3" id="comment-4134">
              <article class="comment-body" id="div-comment-4134">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4134">
                  <time datetime="2013-05-01T19:52:02+00:00">
                   2013/05/01 19:52
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 🙂
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment even depth-3" id="comment-4473">
              <article class="comment-body" id="div-comment-4473">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/b7afd728340b6a9bc4bf3fddbb61f344?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://同样的错误" rel="external nofollow">
                   duzixian
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4473">
                  <time datetime="2013-07-01T12:00:07+00:00">
                   2013/07/01 12:00
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 你好，你的问题是怎么解决的？ 我遇到和你一样的报错，一样的问题，datanode部署和namenode部署是一样的，问题是客户端执行rmr2的还是那样的错。。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3" id="comment-6804">
              <article class="comment-body" id="div-comment-6804">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/d81deaa1ace08d3104938b89ad6fea81?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  潘小喵
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6804">
                  <time datetime="2015-08-06T13:49:21+00:00">
                   2015/08/06 13:49
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 namenode 什么问题，能说一下吗？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment even depth-3" id="comment-6818">
              <article class="comment-body" id="div-comment-6818">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/6402e62ebcf24dd1d1d15629e69ff350?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  xusure
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6818">
                  <time datetime="2015-08-19T18:53:58+00:00">
                   2015/08/19 18:53
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 大神帮忙解决一下，我也遇到这个问题了，给我发个邮件好吗，谢谢帮忙   拜托好几天都没有解决
                 <a href="mailto:xutaojava@163.com">
                  xutaojava@163.com
                 </a>
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3" id="comment-6830">
              <article class="comment-body" id="div-comment-6830">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/e37063010d3ee49399f83b1ad791ed62?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  黄维付
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6830">
                  <time datetime="2015-08-28T14:25:30+00:00">
                   2015/08/28 14:25
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 哥哥，具体是怎么解决的？我也遇到同样的问题。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment even depth-2 parent" id="comment-4474">
            <article class="comment-body" id="div-comment-4474">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/b7afd728340b6a9bc4bf3fddbb61f344?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://同样的错误" rel="external nofollow">
                 duzixian
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4474">
                <time datetime="2013-07-01T12:01:47+00:00">
                 2013/07/01 12:01
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               另外能告诉我你的联系方式吗？张丹同学，能否把dongguozhong的邮箱告诉我呢？谢谢
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给duzixian" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4474#respond" onclick='return addComment.moveForm( "div-comment-4474", "4474", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3" id="comment-6776">
              <article class="comment-body" id="div-comment-6776">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/9706ecae8f353dc7ee74179da28d1e46?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  小玲
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6776">
                  <time datetime="2015-07-17T13:56:38+00:00">
                   2015/07/17 13:56
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 请问你解决了吗？我也遇到这样的问题了。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-4123">
          <article class="comment-body" id="div-comment-4123">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/6255ce65a95bbefaf0a3909956801e25?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              vetri
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4123">
              <time datetime="2013-04-30T15:30:20+00:00">
               2013/04/30 15:30
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             hi ,
             <br/>
             i am using rmr2 and rhdfs ,R-1.15.2, and cdh4
             <br/>
             also set hadoop ,hadoop_cmd and hadoop_streaming environment variables.
             <br/>
             please guide me urgents……please
             <br/>
             Streaming command failed!
             <br/>
             Error in rmr(map=map,reduce=reduce,combine=combine…..:
             <br/>
             hadoop streaming error failed with error code 1
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给vetri" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4123#respond" onclick='return addComment.moveForm( "div-comment-4123", "4123", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2" id="comment-4135">
            <article class="comment-body" id="div-comment-4135">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4135">
                <time datetime="2013-05-01T19:52:28+00:00">
                 2013/05/01 19:52
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               你可以把错误日志贴出来吗？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4135#respond" onclick='return addComment.moveForm( "div-comment-4135", "4135", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-4190">
          <article class="comment-body" id="div-comment-4190">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/2a7af7f8b1b83eb37eca53dd0804bf02?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://你好" rel="external nofollow">
               seven
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4190">
              <time datetime="2013-05-12T01:36:46+00:00">
               2013/05/12 01:36
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             rjava后，包内没有jri是，是下载节点选错了吗，rjava不是带jri吗？求帮助rjava正常，但是希望Java调用r，求帮助
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给seven" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4190#respond" onclick='return addComment.moveForm( "div-comment-4190", "4190", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2 parent" id="comment-4215">
            <article class="comment-body" id="div-comment-4215">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/2a7af7f8b1b83eb37eca53dd0804bf02?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://thx" rel="external nofollow">
                 seven
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4215">
                <time datetime="2013-05-15T23:13:36+00:00">
                 2013/05/15 23:13
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               首先谢谢你回我邮件。问题解决了 给大家分享下：jdk环境问题，当时安装了jdk1.6配置好了就没关openjdk，虽然R CMD javareconf 执行后现显示jdk1.6安装rjava还是出了问题，openjdk卸载了 就可以了 rjava中有了 jri
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给seven" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4215#respond" onclick='return addComment.moveForm( "div-comment-4215", "4215", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3" id="comment-4216">
              <article class="comment-body" id="div-comment-4216">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://blog.fens.me" rel="external nofollow">
                   bsspirit
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4216">
                  <time datetime="2013-05-16T10:24:43+00:00">
                   2013/05/16 10:24
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 解决问题就好。上文中已经有写了JDK一定要用官方的。
                </p>
                <p>
                 ===================
                 <br/>
                 但JDK一定要用Oracle SUN官方的版本，请从官网下载，操作系统的自带的OpenJDK会有各种不兼容。JDK请选择1.6.x的版本，JDK1.7版本也会有各种的不兼容情况。
                 <br/>
                 <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow">
                  http://www.oracle.com/technetwork/java/javase/downloads/index.html
                 </a>
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-4233">
          <article class="comment-body" id="div-comment-4233">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/94091a3cf0b61f53d8117ba1eb34a682?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              mchotcat
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4233">
              <time datetime="2013-05-20T16:36:37+00:00">
               2013/05/20 16:36
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             为什么用hdfs.cat() 函数, 输出的是乱码？我是在mac环境下
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给mchotcat" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4233#respond" onclick='return addComment.moveForm( "div-comment-4233", "4233", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor even depth-2" id="comment-4235">
            <article class="comment-body" id="div-comment-4235">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4235">
                <time datetime="2013-05-20T18:36:31+00:00">
                 2013/05/20 18:36
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               我没有用过mac，都是在linux做的实验。
               <br/>
               你查查是不是hadoop本身原因造成的？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4235#respond" onclick='return addComment.moveForm( "div-comment-4235", "4235", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-4265">
          <article class="comment-body" id="div-comment-4265">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/cd11c8d93e8e05a5ec8ab4bdb48a80fb?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Carrie
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4265">
              <time datetime="2013-05-27T05:41:08+00:00">
               2013/05/27 05:41
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             The same problem as ada.
            </p>
            <p>
             When I call mapreduce, it shows the following message:
            </p>
            <p>
             &gt; out = mapreduce(input = a.dfs,map = function(k,v) keyval(v, 1),reduce = function(k,vv) keyval(k, length(vv)))
             <br/>
             packageJobJar: [/tmp/Rtmp1MOG1F/rmr-local-env1ce26f1e7f40, /tmp/Rtmp1MOG1F/rmr-global-env1ce26fa484c1, /tmp/Rtmp1MOG1F/rmr-streaming-map1ce259675df6, /tmp/Rtmp1MOG1F/rmr-streaming-reduce1ce2520244d, /app/hadoop/tmp/hadoop-unjar6189303437379135382/] [] /tmp/streamjob98282612706550507.jar tmpDir=null
             <br/>
             13/05/26 16:35:44 INFO mapred.FileInputFormat: Total input paths to process : 1
             <br/>
             13/05/26 16:35:44 INFO streaming.StreamJob: getLocalDirs(): [/app/hadoop/tmp/mapred/local]
             <br/>
             13/05/26 16:35:44 INFO streaming.StreamJob: Running job: job_201305261306_0006
             <br/>
             13/05/26 16:35:44 INFO streaming.StreamJob: To kill this job, run:
             <br/>
             13/05/26 16:35:44 INFO streaming.StreamJob: /usr/lib/hadoop/hadoop/libexec/../bin/hadoop job  -Dmapred.job.tracker=localhost:54311 -kill job_201305261306_0006
             <br/>
             13/05/26 16:35:44 INFO streaming.StreamJob: Tracking URL:
             <a href="http://localhost:50030/jobdetails.jsp?jobid=job_201305261306_0006" rel="nofollow">
              http://localhost:50030/jobdetails.jsp?jobid=job_201305261306_0006
             </a>
             <br/>
             13/05/26 16:35:45 INFO streaming.StreamJob:  map 0%  reduce 0%
             <br/>
             13/05/26 16:36:23 INFO streaming.StreamJob:  map 100%  reduce 100%
             <br/>
             13/05/26 16:36:23 INFO streaming.StreamJob: To kill this job, run:
             <br/>
             13/05/26 16:36:23 INFO streaming.StreamJob: /usr/lib/hadoop/hadoop/libexec/../bin/hadoop job  -Dmapred.job.tracker=localhost:54311 -kill job_201305261306_0006
             <br/>
             13/05/26 16:36:23 INFO streaming.StreamJob: Tracking URL:
             <a href="http://localhost:50030/jobdetails.jsp?jobid=job_201305261306_0006" rel="nofollow">
              http://localhost:50030/jobdetails.jsp?jobid=job_201305261306_0006
             </a>
             <br/>
             13/05/26 16:36:23 ERROR streaming.StreamJob: Job not successful. Error: # of failed Map Tasks exceeded allowed limit. FailedCount: 1. LastFailedTask: task_201305261306_0006_m_000000
             <br/>
             13/05/26 16:36:23 INFO streaming.StreamJob: killJob…
             <br/>
             Streaming Command Failed!
             <br/>
             Error in mr(map = map, reduce = reduce, combine = combine, vectorized.reduce,  :
             <br/>
             hadoop streaming failed with error code 1
             <br/>
             Deleted hdfs://localhost:54310/tmp/Rtmp1MOG1F/file1ce21a895897
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Carrie" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4265#respond" onclick='return addComment.moveForm( "div-comment-4265", "4265", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2 parent" id="comment-4266">
            <article class="comment-body" id="div-comment-4266">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/cd11c8d93e8e05a5ec8ab4bdb48a80fb?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                Carrie
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4266">
                <time datetime="2013-05-27T07:01:44+00:00">
                 2013/05/27 07:01
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               问一下，是否需要设置streaming的变量呢？似乎默认的是mapreduce返回值不为0便是错的？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给Carrie" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4266#respond" onclick='return addComment.moveForm( "div-comment-4266", "4266", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment byuser comment-author-conan bypostauthor odd alt depth-3" id="comment-4267">
              <article class="comment-body" id="div-comment-4267">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4267">
                  <time datetime="2013-05-27T10:31:47+00:00">
                   2013/05/27 10:31
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 这个问题，似乎出现的很普遍。
                 <br/>
                 我想请大家首先确认，用JAVA写的mapreduce程序，是能正常运行的。
                </p>
                <p>
                 hadoop官方的例子：
                 <br/>
                 <a href="http://hadoop.apache.org/docs/r1.0.4/mapred_tutorial.html" rel="nofollow">
                  http://hadoop.apache.org/docs/r1.0.4/mapred_tutorial.html
                 </a>
                 <br/>
                 <a href="http://wiki.apache.org/hadoop/WordCount" rel="nofollow">
                  http://wiki.apache.org/hadoop/WordCount
                 </a>
                </p>
                <p>
                 To run the example, the command syntax is
                 <br/>
                 bin/hadoop jar hadoop-*-examples.jar wordcount [-m ] [-r ]
                </p>
                <p>
                 ===================================
                 <br/>
                 成功运行完，JAVA的例子，R的环境应该就没有错误了。包着一层调试看不到本质的错误，是比较麻烦的。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4268">
              <article class="comment-body" id="div-comment-4268">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4268">
                  <time datetime="2013-05-27T10:32:11+00:00">
                   2013/05/27 10:32
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 似乎默认的是mapreduce返回值不为0便是错的？
                </p>
                <p>
                 我没有研究过，这是什么情况！
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-4296">
              <article class="comment-body" id="div-comment-4296">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/6f1347c07b58958d5b5fd3081b1c18b7?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  bob
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4296">
                  <time datetime="2013-05-30T21:05:41+00:00">
                   2013/05/30 21:05
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 同样的问题,我也遇到了,参考这篇http://blog.163.com/zhengjiu_520/blog/static/3559830620130743644473/文章后,改了文件的限制,问题依旧在.
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4298">
              <article class="comment-body" id="div-comment-4298">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4298">
                  <time datetime="2013-05-31T09:32:02+00:00">
                   2013/05/31 09:32
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 我没有发现问题与你参考的文章163的文章，有什么关系。环境问题，最好先确认的JAVA的程序是不是可以成功。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-4301">
              <article class="comment-body" id="div-comment-4301">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/6f1347c07b58958d5b5fd3081b1c18b7?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  bob
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4301">
                  <time datetime="2013-05-31T09:50:32+00:00">
                   2013/05/31 09:50
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 Caused by: java.io.IOException: Cannot run program “Rscript”: java.io.IOException: error=2, No such file or directory
                 <br/>
                 at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214)
                 <br/>
                 … 23 more
                </p>
                <p>
                 我的错误提示也是这个。是需要设置Rscript什么的吗？我的R是自己下载代码编译的，安装目录在$HOME/R，R_LIBS是$HOME/R/lib
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4304">
              <article class="comment-body" id="div-comment-4304">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4304">
                  <time datetime="2013-05-31T09:59:54+00:00">
                   2013/05/31 09:59
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 你自己的编译的R也没关系。 把R, Rscript命令设置为全局的命令。
                </p>
                <p>
                 用root用户，启动hadoop和R，保证有足够的权限访问。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3 parent" id="comment-4307">
              <article class="comment-body" id="div-comment-4307">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/6f1347c07b58958d5b5fd3081b1c18b7?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  bob
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4307">
                  <time datetime="2013-05-31T10:30:10+00:00">
                   2013/05/31 10:30
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 参考这个文章https://github.com/RevolutionAnalytics/RHadoop/issues/87
                 <br/>
                 确实解决了Rscript的问题,需要在/usr/bin下有Rscript，sudo ln -s /home/bob/R/bin/Rscript /usr/bin/Rscript
                 <br/>
                 然后就遇到你上面提到的权限问题了。
                 <br/>
                 ava.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 1
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:362)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:576)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapper.close(PipeMapper.java:135)
                 <br/>
                 at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:36)
                 <br/>
                 at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:436)
                 <br/>
                 at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
                 <br/>
                 at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
                 <br/>
                 at java.security.AccessController.doPrivileged(Native Method)
                 <br/>
                 at javax.security.auth.Subject.doAs(Subject.java:396)
                 <br/>
                 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
                 <br/>
                 at org.apache.hadoop.mapred.Child.main(Child.java:249)
                </p>
                <p>
                 我hadoop是安装在bob账号下的,能直接切换到root账号去运行吗?另外,你的操作,都是在root的账号下进行的吗?
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor even depth-3" id="comment-4308">
              <article class="comment-body" id="div-comment-4308">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4308">
                  <time datetime="2013-05-31T11:18:30+00:00">
                   2013/05/31 11:18
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 1. 我的例子都是在root中运行的
                 <br/>
                 ubuntu环境：sudo -i
                 <br/>
                 2. 生产环境用root是不安全的，这当然需要把环境权限都设置好。
                 <br/>
                 3. 由于R和hadoop都是自己安装的，访问权限会有不一样，除非你都装在了自己的home下面，用root执行可能会减少麻烦。
                </p>
                <p>
                 另外：rhadoop是一个复杂的东西，需要熟悉linux,java,hadoop,r 4种知识，自己掌握好或者需要hadoop运维的技术人员，帮助统计人员做一个环境。才能从根本上解决安装配置的错误。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor odd alt depth-3" id="comment-4433">
              <article class="comment-body" id="div-comment-4433">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4433">
                  <time datetime="2013-06-24T00:34:07+00:00">
                   2013/06/24 00:34
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 解决RHadoop错误：PipeMapRed.waitOutputThreads(): subprocess failed with code 1
                 <br/>
                 <a href="http://blog.fens.me/rhadoop-rmr2-pipemapred/" rel="nofollow">
                  http://blog.fens.me/rhadoop-rmr2-pipemapred/
                 </a>
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-4299">
          <article class="comment-body" id="div-comment-4299">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/6f1347c07b58958d5b5fd3081b1c18b7?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              bob
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4299">
              <time datetime="2013-05-31T09:38:16+00:00">
               2013/05/31 09:38
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             wordcount能成功就ok吗？
             <br/>
             看log也是有Cannot run program “Rscript”这样的错误，而我在R目录下能找到这个程序，也能从bash里面运行
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给bob" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4299#respond" onclick='return addComment.moveForm( "div-comment-4299", "4299", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2" id="comment-4302">
            <article class="comment-body" id="div-comment-4302">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4302">
                <time datetime="2013-05-31T09:52:42+00:00">
                 2013/05/31 09:52
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               如果JAVA能成功运行wordcount，hadoop环境就没有什么问题。
              </p>
              <p>
               Rscript是streaming的问题，你和其他人的问题是不一样的，贴一下你的详细日志，我帮你看看。当然如果能让我直接访问到你的环境调试是最理想的。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4302#respond" onclick='return addComment.moveForm( "div-comment-4302", "4302", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-4309">
          <article class="comment-body" id="div-comment-4309">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/91159aa34d6a0bc395607ec3b192121d?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Nemo
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4309">
              <time datetime="2013-05-31T11:37:37+00:00">
               2013/05/31 11:37
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             LZ你好，我也碰到了和bob一样的问题，前一个问题是Rscript未找到，建了软连接之后还是报这个错，后发现各个集群机都必须安装R及Rscript，并且必须安装文中提到的所有依赖的R package，把各个datanode的环境弄好之后mapreduce终于过了 =3= 准备弄rhbase咯
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Nemo" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4309#respond" onclick='return addComment.moveForm( "div-comment-4309", "4309", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2 parent" id="comment-4310">
            <article class="comment-body" id="div-comment-4310">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4310">
                <time datetime="2013-05-31T11:43:22+00:00">
                 2013/05/31 11:43
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               你好，很高兴看到你解决问题了。
               <br/>
               我猜一定已经有了一些hadoop的使用经验，碰到这些错误，有自己的解决办法。
               <br/>
               rmr实际上就是通过hadoop streaming做的，和python调用hadoop是一样，datanode的环境配置也是一个麻烦事。可以用虚拟机去复制相同的环境，再部署多节点就方便了。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4310#respond" onclick='return addComment.moveForm( "div-comment-4310", "4310", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3 parent" id="comment-4311">
              <article class="comment-body" id="div-comment-4311">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/91159aa34d6a0bc395607ec3b192121d?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  Nemo
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4311">
                  <time datetime="2013-05-31T11:55:39+00:00">
                   2013/05/31 11:55
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 嗯，我的环境是VirtualBox+CentOS6.4，复制虚拟机之前我只用rpm包装了hadoop并且配置了环境，搞得现在各个机器都要重复安装各种包，走了不少弯路哦，不过好处是下次可以尽量少走点弯路了，希望LZ在文章里面加上一点关于集群机的注释，再次感谢~
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-conan bypostauthor odd alt depth-3" id="comment-4312">
              <article class="comment-body" id="div-comment-4312">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张 丹
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4312">
                  <time datetime="2013-05-31T12:02:44+00:00">
                   2013/05/31 12:02
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 这边是“统计学”为主的论坛。
                 <br/>
                 现在安装环境各种问题，已经让大部分的统计学背景的工作人员束手无策了
                 <br/>
                 。rhadoop的集群的一些问题，咱们可以在我的博客，相同的帖子中继续讨论。http://blog.fens.me/rhadoop-rhadoop/
                </p>
                <p>
                 我也有一些虚拟化的解决方案。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment byuser comment-author-conan bypostauthor even depth-2" id="comment-4432">
            <article class="comment-body" id="div-comment-4432">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4432">
                <time datetime="2013-06-24T00:33:45+00:00">
                 2013/06/24 00:33
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               解决RHadoop错误：PipeMapRed.waitOutputThreads(): subprocess failed with code 1
               <br/>
               <a href="http://blog.fens.me/rhadoop-rmr2-pipemapred/" rel="nofollow">
                http://blog.fens.me/rhadoop-rmr2-pipemapred/
               </a>
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4432#respond" onclick='return addComment.moveForm( "div-comment-4432", "4432", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-4389">
          <article class="comment-body" id="div-comment-4389">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/264dd539428e1b877fe9946fe48b9175?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Leo Shao
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4389">
              <time datetime="2013-06-13T17:04:39+00:00">
               2013/06/13 17:04
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，我已经成功的安装了hadoop和r环境，并且按照你的steps跑成功了例子，谢谢你。
            </p>
            <p>
             不过我有一个问题，我看到其他一些资料里都指出需要在所有结点上安装rmr2，但是我仅仅在一台节点上安装，却能够跑成功例子，不知道博主有没有注意到这点？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Leo Shao" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4389#respond" onclick='return addComment.moveForm( "div-comment-4389", "4389", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor even depth-2 parent" id="comment-4390">
            <article class="comment-body" id="div-comment-4390">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4390">
                <time datetime="2013-06-13T18:26:49+00:00">
                 2013/06/13 18:26
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               刚才回复的内容有点问题。
               <br/>
               R是通过hadoop streaming方式调用hadoop的，要根据streaming的规则，去安装R的环境。
               <br/>
               你可以列一下，你的hadoop的各节点，数据在datanode上的分布吗？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4390#respond" onclick='return addComment.moveForm( "div-comment-4390", "4390", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3" id="comment-4391">
              <article class="comment-body" id="div-comment-4391">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/264dd539428e1b877fe9946fe48b9175?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  Leo Shao
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4391">
                  <time datetime="2013-06-13T18:55:43+00:00">
                   2013/06/13 18:55
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 恩，我刚才也试了下在所有data节点上安装rmr2，重新跑任务的时候发现这次用到了3个结点，速度快了很多，应该是需要在所有datanode上安装的，否则task会失败，我先前能够成功实际是假象，应该是task失败了，jobtrack重新分配给安装过rmr2的datanode了，所以看上去成功，实际只用到了1台机器。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-4651">
          <article class="comment-body" id="div-comment-4651">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/72db9d5e6f9f6ffebf04cd7f891c8f41?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Ann
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4651">
              <time datetime="2013-08-16T13:16:20+00:00">
               2013/08/16 13:16
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             hadoop-Streaming运行时:error:# of failed Map Tasks exceeded allowed limit
             <br/>
             我在运行时候出现这个错误   代码用C语言写的。 我看上面有个一样的错误 您说是hadoop本身的错误。我想知道这个错误怎么解决呢？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Ann" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4651#respond" onclick='return addComment.moveForm( "div-comment-4651", "4651", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-conan bypostauthor odd alt depth-2" id="comment-4652">
            <article class="comment-body" id="div-comment-4652">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                张 丹
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4652">
                <time datetime="2013-08-16T15:04:01+00:00">
                 2013/08/16 15:04
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               上面只是提示是map运行超过次数了，根本原因没有提示出来，map为什么会超过运行次数呢？
               <br/>
               你需要查datanode的日志，可能是程序有异常，datanode宕机，其他人的程序在长期占用CPU，内存等。
              </p>
              <p>
               先查明具体原因，再解决。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给张 丹" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4652#respond" onclick='return addComment.moveForm( "div-comment-4652", "4652", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-4870">
          <article class="comment-body" id="div-comment-4870">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/zx846417923" rel="external nofollow">
               张笑
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-4870">
              <time datetime="2013-09-16T18:06:19+00:00">
               2013/09/16 18:06
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             老师 R2.15版本 系统要求必须得是64位吗 32位的可以吗
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给张笑" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=4870#respond" onclick='return addComment.moveForm( "div-comment-4870", "4870", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-5204">
            <article class="comment-body" id="div-comment-5204">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://t.qq.com/liuhongbin1990" rel="external nofollow">
                 刘洪彬
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5204">
                <time datetime="2013-12-27T12:19:57+00:00">
                 2013/12/27 12:19
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               可以的，我用的是centos6.3 32位，Hadoop 1.0.3 ，R 3.0.2 ，rmr2_2.1.0.tar.gz，rhdfs_1.0.8.tar.gz。可以运行。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给刘洪彬" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5204#respond" onclick='return addComment.moveForm( "div-comment-5204", "5204", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1" id="comment-5064">
          <article class="comment-body" id="div-comment-5064">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2157243480" rel="external nofollow">
               billyshawn
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5064">
              <time datetime="2013-11-11T19:36:46+00:00">
               2013/11/11 19:36
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             我在SUSE Linux环境下也是乱码，是什么原因呢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给billyshawn" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5064#respond" onclick='return addComment.moveForm( "div-comment-5064", "5064", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-5088">
          <article class="comment-body" id="div-comment-5088">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/lyt8869207" rel="external nofollow">
               杨桃充值
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5088">
              <time datetime="2013-11-15T14:38:25+00:00">
               2013/11/15 14:38
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             我执行这个以后，
             <br/>
             res=mapreduce(input =small.ints,map= function(k,v) cbind(v,v^2))
             <br/>
             13/11/15 13:51:45 WARN streaming.StreamJob: -file option is deprecated, please use generic option -files instead.
             <br/>
             packageJobJar: [/tmp/Rtmp5jCqkH/rmr-local-env225c4eaa10fd, /tmp/Rtmp5jCqkH/rmr-global-env225c3d5c4104, /tmp/Rtmp5jCqkH/rmr-streaming-map225c34bc5d19, /home/unbank/hadoop/hadoop-2.2.0/hadoop-unbank/tmp/hadoop-unjar4962933089646072299/] [] /tmp/streamjob6114878497101137251.jar tmpDir=null
             <br/>
             13/11/15 13:51:49 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
             <br/>
             13/11/15 13:51:49 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
             <br/>
             13/11/15 13:51:50 INFO mapred.FileInputFormat: Total input paths to process : 1
             <br/>
             13/11/15 13:51:51 INFO mapreduce.JobSubmitter: number of splits:2
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: user.name is deprecated. Instead, use mapreduce.job.user.name
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.cache.files.filesizes is deprecated. Instead, use mapreduce.job.cache.files.filesizes
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.cache.files is deprecated. Instead, use mapreduce.job.cache.files
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.value.class
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.mapoutput.value.class is deprecated. Instead, use mapreduce.map.output.value.class
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.job.name is deprecated. Instead, use mapreduce.job.name
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.output.dir is deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.cache.files.timestamps is deprecated. Instead, use mapreduce.job.cache.files.timestamps
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.output.key.class is deprecated. Instead, use mapreduce.job.output.key.class
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.mapoutput.key.class is deprecated. Instead, use mapreduce.map.output.key.class
             <br/>
             13/11/15 13:51:51 INFO Configuration.deprecation: mapred.working.dir is deprecated. Instead, use mapreduce.job.working.dir
             <br/>
             13/11/15 13:51:51 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1384493261396_0002
             <br/>
             13/11/15 13:51:52 INFO impl.YarnClientImpl: Submitted application application_1384493261396_0002 to ResourceManager at /0.0.0.0:8032
             <br/>
             13/11/15 13:51:52 INFO mapreduce.Job: The url to track the job:
             <a href="http://unbank:8088/proxy/application_1384493261396_0002/" rel="nofollow">
              http://unbank:8088/proxy/application_1384493261396_0002/
             </a>
             <br/>
             13/11/15 13:51:52 INFO mapreduce.Job: Running job: job_1384493261396_0002
             <br/>
             执行到这个地方就不往下执行了，请问这个是什么原因
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给杨桃充值" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5088#respond" onclick='return addComment.moveForm( "div-comment-5088", "5088", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5296">
            <article class="comment-body" id="div-comment-5296">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5296">
                <time datetime="2014-01-26T11:18:21+00:00">
                 2014/01/26 11:18
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               Yarn，似乎hadoop版本太高了。换成hadoop 1.0.x再试试。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5296#respond" onclick='return addComment.moveForm( "div-comment-5296", "5296", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-5207">
          <article class="comment-body" id="div-comment-5207">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://www.douban.com/people/67395479/" rel="external nofollow">
               子非鱼
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5207">
              <time datetime="2013-12-28T16:22:48+00:00">
               2013/12/28 16:22
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好！
             <br/>
             &gt; Sys.setenv(HADOOP_HOME="/usr/hadoop/hadoop-0.20.203.0")
             <br/>
             &gt; Sys.setenv(HADOOP_CMD="/usr/hadoop/hadoop-0.20.203.0/bin/hadoop")
             <br/>
             &gt; Sys.setenv(HADOOP_BIN="/usr/haddop/hadoop-0.20.203.0/bin")
             <br/>
             &gt; Sys.setenv(HADOOP_CONF_DIR="/usr/hadoop/hadoop-0.20.203.0/conf")
             <br/>
             &gt; Sys.setenv(HADOOP_STREAMING="/usr/hadoop/hadoop-0.20.203.0/contrib/streaming/hadoop-streaming-0.20.203.0.jar
             <br/>
             + ")
             <br/>
             &gt; Sys.setenv(LD_LIBRARY_PATH="/usr/lib/java/jdk1.6.0_45/jre/lib/i386/server")
             <br/>
             &gt; library(rmr2)
             <br/>
             &gt; library(rhdfs)
             <br/>
             &gt; hdfs.init()
             <br/>
             &gt; hpInput=to.dfs(mtcars$hp)
             <br/>
             13/12/28 15:49:22 ERROR streaming.StreamJob: Missing required options: input, output
             <br/>
             Usage: $HADOOP_HOME/bin/hadoop jar
             <br/>
             $HADOOP_HOME/hadoop-streaming.jar [options]
             <br/>
             Options:
             <br/>
             -input    &lt;path&gt;     DFS input file(s) for the Map step
             <br/>
             -output   &lt;path&gt;     DFS output directory for the Reduce step
             <br/>
             -mapper   &lt;cmd|JavaClassName&gt;      The streaming command to run
             <br/>
             -combiner &lt;cmd|JavaClassName&gt; The streaming command to run
             <br/>
             -reducer  &lt;cmd|JavaClassName&gt;      The streaming command to run
             <br/>
             -file     &lt;file&gt;     File/dir to be shipped in the Job jar file
             <br/>
             -inputformat TextInputFormat(default)|SequenceFileAsTextInputFormat|JavaClassName Optional.
             <br/>
             -outputformat TextOutputFormat(default)|JavaClassName  Optional.
             <br/>
             -partitioner JavaClassName  Optional.
             <br/>
             -numReduceTasks &lt;num&gt;  Optional.
             <br/>
             -inputreader &lt;spec&gt;  Optional.
             <br/>
             -cmdenv   &lt;n&gt;=&lt;v&gt;    Optional. Pass env.var to streaming commands
             <br/>
             -mapdebug &lt;path&gt;  Optional. To run this script when a map task fails
             <br/>
             -reducedebug &lt;path&gt;  Optional. To run this script when a reduce task fails
             <br/>
             -verbose
            </p>
            <p>
             Generic options supported are
             <br/>
             -conf &lt;configuration file&gt;     specify an application configuration file
             <br/>
             -D &lt;property=value&gt;            use value for given property
             <br/>
             -fs &lt;local|namenode:port&gt;      specify a namenode
             <br/>
             -jt &lt;local|jobtracker:port&gt;    specify a job tracker
             <br/>
             -files &lt;comma separated list of files&gt;    specify comma separated files to be copied to the map reduce cluster
             <br/>
             -libjars &lt;comma separated list of jars&gt;    specify comma separated jar files to include in the classpath.
             <br/>
             -archives &lt;comma separated list of archives&gt;    specify comma separated archives to be unarchived on the compute machines.
            </p>
            <p>
             The general command line syntax is
             <br/>
             bin/hadoop command [genericOptions] [commandOptions]
            </p>
            <p>
             For more details about these options:
             <br/>
             Use $HADOOP_HOME/bin/hadoop jar build/hadoop-streaming.jar -info
            </p>
            <p>
             Streaming Job Failed!
             <br/>
             sh: 2: loadtb: not found
             <br/>
             Warning message:
             <br/>
             In to.dfs(mtcars$hp) : Converting to.dfs argument to keyval with a NULL key
             <br/>
             &gt;
             <br/>
             提示：13/12/28 15:49:22 ERROR streaming.StreamJob: Missing required options: input, output
             <br/>
             Usage: $HADOOP_HOME/bin/hadoop jar
             <br/>
             $HADOOP_HOME/hadoop-streaming.jar [options]
             <br/>
             请问是什么原因呢？？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给子非鱼" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5207#respond" onclick='return addComment.moveForm( "div-comment-5207", "5207", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5295">
            <article class="comment-body" id="div-comment-5295">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5295">
                <time datetime="2014-01-26T11:17:11+00:00">
                 2014/01/26 11:17
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               从你的错误中看，hadoop.jar 没有在R的运行路径中。
              </p>
              <p>
               Missingrequiredoptions:input,outputUsage:HADOOP_HOME/bin/hadoop jar
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5295#respond" onclick='return addComment.moveForm( "div-comment-5295", "5295", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-5292">
          <article class="comment-body" id="div-comment-5292">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/asd770812562" rel="external nofollow">
               sisi
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5292">
              <time datetime="2014-01-25T16:21:08+00:00">
               2014/01/25 16:21
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             LZ你好，由于rmr要用到Rcpp，所以在R下安装install.packages("Rcpp")时出现一个问题：
             <br/>
             Installing package(s) into ‘/usr/lib/R/site-library’
             <br/>
             (as ‘lib’ is unspecified)
             <br/>
             Warning message:
             <br/>
             package ‘Rcpp’ is not available (for R version 2.15.3) 请问一下这是因为我的R版本不对吗，还是其他问题呢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给sisi" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5292#respond" onclick='return addComment.moveForm( "div-comment-5292", "5292", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2 parent" id="comment-5293">
            <article class="comment-body" id="div-comment-5293">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5293">
                <time datetime="2014-01-26T11:14:26+00:00">
                 2014/01/26 11:14
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               安装时，切换成root用户安装。
              </p>
              <p>
               R安装的库的位置有3个，不同的用户权限安装的位置不一样。
               <br/>
               /usr/lib/R/site-library
              </p>
              <p>
               普通用户安装时，会有一个如下的错误，要调整权限。
               <br/>
               <a href="http://blog.fens.me/rhadoop-rmr2-pipemapred/" rel="nofollow">
                http://blog.fens.me/rhadoop-rmr2-pipemapred/
               </a>
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5293#respond" onclick='return addComment.moveForm( "div-comment-5293", "5293", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3 parent" id="comment-5297">
              <article class="comment-body" id="div-comment-5297">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://t.qq.com/asd770812562" rel="external nofollow">
                   sisi
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5297">
                  <time datetime="2014-01-27T14:59:08+00:00">
                   2014/01/27 14:59
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 恩 我后来用root用户重新安装了，但现在碰到新的问题了，和楼上问题相似，我也参考了你们的解决办法，但问题还是存在。
                 <br/>
                 现在测试rhdfs已经成功了，在测试rmr2的时候碰到问题
                 <br/>
                 说明：我是用的普通用户hdadmin启动hadoop集群，无论用hdadmin用户还是root用户切入R，测试rmr2都得到下述结果
                 <br/>
                 &gt;  small.ints = to.dfs(1:10)
                 <br/>
                 14/01/26 22:02:21 INFO util.NativeCodeLoader: Loaded the native-hadoop library
                 <br/>
                 14/01/26 22:02:21 INFO zlib.ZlibFactory: Successfully loaded &amp; initialized native-zlib library
                 <br/>
                 14/01/26 22:02:21 INFO compress.CodecPool: Got brand-new compressor
                 <br/>
                 Warning message:
                 <br/>
                 In to.dfs(1:10) : Converting to.dfs argument to keyval with a NULL key
                 <br/>
                 &gt; mapreduce(input = small.ints, map = function(k, v) cbind(v, v^2))
                 <br/>
                 packageJobJar: [/tmp/RtmpncSSf0/rmr-local-env9d24b382733, /tmp/RtmpncSSf0/rmr-global-env9d222ad868e, /tmp/RtmpncSSf0/rmr-streaming-map9d232fe24dc, /tmp/hadoop-hdadmin/hadoop-unjar5098756360591375117/] [] /tmp/streamjob8914590488178173834.jar tmpDir=null
                 <br/>
                 14/01/26 22:02:41 INFO mapred.FileInputFormat: Total input paths to process : 1
                 <br/>
                 14/01/26 22:02:44 INFO streaming.StreamJob: getLocalDirs(): [/tmp/hadoop-hdadmin/mapred/local]
                 <br/>
                 14/01/26 22:02:44 INFO streaming.StreamJob: Running job: job_201401262200_0001
                 <br/>
                 14/01/26 22:02:44 INFO streaming.StreamJob: To kill this job, run:
                 <br/>
                 14/01/26 22:02:44 INFO streaming.StreamJob: /home/hdadmin/hadoop/libexec/../bin/hadoop job  -Dmapred.job.tracker=master:9001 -kill job_201401262200_0001
                 <br/>
                 14/01/26 22:02:44 INFO streaming.StreamJob: Tracking URL:
                 <a href="http://master:50030/jobdetails.jsp?jobid=job_201401262200_0001" rel="nofollow">
                  http://master:50030/jobdetails.jsp?jobid=job_201401262200_0001
                 </a>
                 <br/>
                 14/01/26 22:02:45 INFO streaming.StreamJob:  map 0%  reduce 0%
                 <br/>
                 14/01/26 22:03:10 INFO streaming.StreamJob:  map 100%  reduce 100%
                 <br/>
                 14/01/26 22:03:10 INFO streaming.StreamJob: To kill this job, run:
                 <br/>
                 14/01/26 22:03:10 INFO streaming.StreamJob: /home/hdadmin/hadoop/libexec/../bin/hadoop job  -Dmapred.job.tracker=master:9001 -kill job_201401262200_0001
                 <br/>
                 14/01/26 22:03:10 INFO streaming.StreamJob: Tracking URL:
                 <a href="http://master:50030/jobdetails.jsp?jobid=job_201401262200_0001" rel="nofollow">
                  http://master:50030/jobdetails.jsp?jobid=job_201401262200_0001
                 </a>
                 <br/>
                 14/01/26 22:03:10 ERROR streaming.StreamJob: Job not successful. Error: # of failed Map Tasks exceeded allowed limit. FailedCount: 1. LastFailedTask: task_201401262200_0001_m_000000
                 <br/>
                 14/01/26 22:03:10 INFO streaming.StreamJob: killJob…
                 <br/>
                 Streaming Command Failed!
                 <br/>
                 Error in mr(map = map, reduce = reduce, combine = combine, vectorized.reduce,  :
                 <br/>
                 hadoop streaming failed with error code 1
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment even depth-3" id="comment-5298">
              <article class="comment-body" id="div-comment-5298">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://t.qq.com/asd770812562" rel="external nofollow">
                   sisi
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5298">
                  <time datetime="2014-01-27T15:00:39+00:00">
                   2014/01/27 15:00
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 我跟踪了一下日志：
                 <br/>
                 java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 1
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:362)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:576)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapper.close(PipeMapper.java:135)
                 <br/>
                 at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:36)
                 <br/>
                 at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
                 <br/>
                 at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366)
                 <br/>
                 at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
                 <br/>
                 at java.security.AccessController.doPrivileged(Native Method)
                 <br/>
                 at javax.security.auth.Subject.doAs(Subject.java:396)
                 <br/>
                 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
                 <br/>
                 at org.apache.hadoop.mapred.Child.main(Child.java:249)
                 <br/>
                 Caused by: java.lang.RuntimeException: Error in configuring object
                 <br/>
                 at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
                 <br/>
                 at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
                 <br/>
                 at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
                 <br/>
                 at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
                 <br/>
                 … 14 more
                 <br/>
                 Caused by: java.lang.reflect.InvocationTargetException
                 <br/>
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 <br/>
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 <br/>
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 <br/>
                 at java.lang.reflect.Method.invoke(Method.java:597)
                 <br/>
                 at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
                 <br/>
                 … 17 more
                 <br/>
                 Caused by: java.lang.RuntimeException: configuration exception
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:230)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66)
                 <br/>
                 … 22 more
                 <br/>
                 Caused by: java.io.IOException: Cannot run program "Rscript": java.io.IOException: error=2, No such file or directory
                 <br/>
                 at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214)
                 <br/>
                 … 23 more
                 <br/>
                 Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
                 <br/>
                 at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:148)
                 <br/>
                 at java.lang.ProcessImpl.start(ProcessImpl.java:65)
                 <br/>
                 at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
                 <br/>
                 … 24 more
                </p>
                <p>
                 1.用root用户切入R，查看了libPaths
                 <br/>
                 &gt; .libPaths()
                 <br/>
                 "/usr/local/lib/R/site-library" "/usr/local/lib/R/library"
                 <br/>
                 2.查看/usr/local/lib/R/site-library各种rmr所要依赖的库都存在的
                 <br/>
                 root@master:/usr/local/lib/R/site-library# ls
                 <br/>
                 bitops  functional  itertools  Rcpp      rhdfs  RJSONIO  stringr
                 <br/>
                 digest  iterators   plyr       reshape2  rJava  rmr2
                 <br/>
                 3.hdfs-site.xml中的文件我也加上了
                 <br/>
                 &lt;property&gt;
                 <br/>
                 &lt;name&gt;dfs.permissions&lt;/name&gt;
                 <br/>
                 &lt;value&gt;false&lt;/value&gt;
                 <br/>
                 &lt;/property&gt;
                 <br/>
                 找到这里，我没思路了，LZ及各位大神~~帮忙看看，问题应该是出在哪儿呢，非常感谢啦~~
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment odd alt depth-2" id="comment-5294">
            <article class="comment-body" id="div-comment-5294">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/732c1985d0f02cef1d2c69df55aca7d0?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5294">
                <time datetime="2014-01-26T11:14:36+00:00">
                 2014/01/26 11:14
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               安装时，切换成root用户安装。
              </p>
              <p>
               R安装的库的位置有3个，不同的用户权限安装的位置不一样。
               <br/>
               /usr/lib/R/site-library
              </p>
              <p>
               普通用户安装时，会有一个如下的错误，要调整权限。
               <br/>
               <a href="http://blog.fens.me/rhadoop-rmr2-pipemapred/" rel="nofollow">
                http://blog.fens.me/rhadoop-rmr2-pipemapred/
               </a>
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5294#respond" onclick='return addComment.moveForm( "div-comment-5294", "5294", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-5319">
          <article class="comment-body" id="div-comment-5319">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2196889464" rel="external nofollow">
               偶宇翔_Echo
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5319">
              <time datetime="2014-02-07T21:59:02+00:00">
               2014/02/07 21:59
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             &gt; hdfs.init()
            </p>
            <p>
             sh: 1: /usr/local/hadoop/bin: Permission denied
             <br/>
             错误于.jnew("org/apache/hadoop/conf/Configuration") :
             <br/>
             java.lang.ClassNotFoundException
             <br/>
             此外: 警告信息：
             <br/>
             运行命令’/usr/local/hadoop/bin classpath’的状态是126
            </p>
            <p>
             求问这怎么回事？谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给偶宇翔_Echo" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5319#respond" onclick='return addComment.moveForm( "div-comment-5319", "5319", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-5794">
            <article class="comment-body" id="div-comment-5794">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5794">
                <time datetime="2014-05-27T22:56:51+00:00">
                 2014/05/27 22:56
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               似乎是权限问题，R不能使用hadoop的命令。切换成root用户操作。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5794#respond" onclick='return addComment.moveForm( "div-comment-5794", "5794", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
           <li class="comment even depth-2" id="comment-5795">
            <article class="comment-body" id="div-comment-5795">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5795">
                <time datetime="2014-05-27T22:56:58+00:00">
                 2014/05/27 22:56
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               似乎是权限问题，R不能使用hadoop的命令。切换成root用户操作。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5795#respond" onclick='return addComment.moveForm( "div-comment-5795", "5795", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-5364">
          <article class="comment-body" id="div-comment-5364">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/88352d8a1345ebcc08959427c58283b3?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              isaac
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5364">
              <time datetime="2014-02-19T16:39:23+00:00">
               2014/02/19 16:39
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             楼主您好 我也遇到了和sisi一样的问题：
             <br/>
             &gt; install.packages("Rcpp")
             <br/>
             Installing package(s) into ‘/usr/local/lib/R/site-library’
             <br/>
             (as ‘lib’ is unspecified)
             <br/>
             — Please select a CRAN mirror for use in this session —
             <br/>
             Loading Tcl/Tk interface … done
             <br/>
             Warning message:
             <br/>
             package ‘Rcpp’ is not available (for R version 2.15.3)
            </p>
            <p>
             并且我此时的用户权限确实是：
             <br/>
             root@rmaster:~# pwd
             <br/>
             /root
             <br/>
             root@rmaster:~# R
             <br/>
             所以我应该如何解决这个问题呢？
             <br/>
             非常感谢楼主
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给isaac" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5364#respond" onclick='return addComment.moveForm( "div-comment-5364", "5364", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2 parent" id="comment-5460">
            <article class="comment-body" id="div-comment-5460">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/06dd70a9b25696e396f679f1b0d61ef5?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                jesebel
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5460">
                <time datetime="2014-03-20T16:08:22+00:00">
                 2014/03/20 16:08
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               我遇到这个问题，是自己下载了一个Rcpp的包，然后用R CMD INSTALL命令安装好的，希望对你有用
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给jesebel" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5460#respond" onclick='return addComment.moveForm( "div-comment-5460", "5460", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3 parent" id="comment-5462">
              <article class="comment-body" id="div-comment-5462">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://t.qq.com/isaacyou" rel="external nofollow">
                   自由摩西
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5462">
                  <time datetime="2014-03-20T17:42:24+00:00">
                   2014/03/20 17:42
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 你能在rhadoop里面生成大数据了吗？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment even depth-3" id="comment-5470">
              <article class="comment-body" id="div-comment-5470">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/06dd70a9b25696e396f679f1b0d61ef5?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  jesebel
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5470">
                  <time datetime="2014-03-24T09:17:14+00:00">
                   2014/03/24 09:17
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 我没试过大数据，不好意思
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment odd alt depth-2" id="comment-5796">
            <article class="comment-body" id="div-comment-5796">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5796">
                <time datetime="2014-05-27T22:57:37+00:00">
                 2014/05/27 22:57
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               换一个镜像试试
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5796#respond" onclick='return addComment.moveForm( "div-comment-5796", "5796", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-5433">
          <article class="comment-body" id="div-comment-5433">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/isaacyou" rel="external nofollow">
               自由摩西
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5433">
              <time datetime="2014-03-12T10:55:13+00:00">
               2014/03/12 10:55
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             往Hadoop里面添加数据是不是有大小限制呢？
             <br/>
             超过1G的数据就传不进去是吗？
             <br/>
             大家看看这个矩阵是16000*10的小矩阵
             <br/>
             很快就显示Successfully loaded
             <br/>
             昨天我传的一个16000000*10的大矩阵传了很久 最后显示killed
             <br/>
             退出了rhadoop
            </p>
            <p>
             而且16000000*10的大矩阵其实也就不到1.2G 也不能算很大吧
             <br/>
             请各位大神帮忙看看啊
             <br/>
             为啥对于三个节点的hadoop集群来说
             <br/>
             1.2G的大矩阵都传不上去呢？？
            </p>
            <p>
             我的每个节点都有4G内存的
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给自由摩西" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5433#respond" onclick='return addComment.moveForm( "div-comment-5433", "5433", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-5797">
            <article class="comment-body" id="div-comment-5797">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5797">
                <time datetime="2014-05-27T22:58:13+00:00">
                 2014/05/27 22:58
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               没有看到你的具体操作，不清楚原因！
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5797#respond" onclick='return addComment.moveForm( "div-comment-5797", "5797", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-5461">
          <article class="comment-body" id="div-comment-5461">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/06dd70a9b25696e396f679f1b0d61ef5?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              jesebel
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5461">
              <time datetime="2014-03-20T16:13:03+00:00">
               2014/03/20 16:13
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             楼主，我安装rmr的时候，遇到很奇怪的问题，
             <br/>
             sudo R CMD INSTALL -l /usr/local/lib/R/site-library/ /home/hduser/R/rmr2-2.2.0.tar.gz
             <br/>
             untar2(tarfile, files, list, exdir)里有警告:
             <br/>
             skipping pax global extended headers
             <br/>
             错误： cannot extract package from ‘/home/hduser/R/rmr2-2.2.0.tar.gz’
             <br/>
             google也未果，能帮忙解决下么，谢谢啦
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给jesebel" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5461#respond" onclick='return addComment.moveForm( "div-comment-5461", "5461", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2 parent" id="comment-5784">
            <article class="comment-body" id="div-comment-5784">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://weibo.com/3237944073" rel="external nofollow">
                 ImGarfield
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5784">
                <time datetime="2014-05-27T20:24:14+00:00">
                 2014/05/27 20:24
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               解决了吗？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给ImGarfield" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5784#respond" onclick='return addComment.moveForm( "div-comment-5784", "5784", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3 parent" id="comment-5785">
              <article class="comment-body" id="div-comment-5785">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://weibo.com/3237944073" rel="external nofollow">
                   ImGarfield
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5785">
                  <time datetime="2014-05-27T20:27:01+00:00">
                   2014/05/27 20:27
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 我也遇到了同样的问题，怎么搞？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment odd alt depth-3" id="comment-5799">
              <article class="comment-body" id="div-comment-5799">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/06dd70a9b25696e396f679f1b0d61ef5?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  jesebel
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5799">
                  <time datetime="2014-05-28T09:21:33+00:00">
                   2014/05/28 09:21
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 没有解决
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment even depth-2" id="comment-5793">
            <article class="comment-body" id="div-comment-5793">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5793">
                <time datetime="2014-05-27T22:55:20+00:00">
                 2014/05/27 22:55
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               是不是下载的包有问题？重新下一个吧。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5793#respond" onclick='return addComment.moveForm( "div-comment-5793", "5793", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-5483">
          <article class="comment-body" id="div-comment-5483">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/d87a5074c57714240881158034190500?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              rhadoop
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5483">
              <time datetime="2014-03-28T16:40:40+00:00">
               2014/03/28 16:40
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             hi lz  所以的hadoop系统节点都要安装R？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给rhadoop" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5483#respond" onclick='return addComment.moveForm( "div-comment-5483", "5483", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5792">
            <article class="comment-body" id="div-comment-5792">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5792">
                <time datetime="2014-05-27T22:54:50+00:00">
                 2014/05/27 22:54
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               是的，都要装R
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5792#respond" onclick='return addComment.moveForm( "div-comment-5792", "5792", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-5484">
          <article class="comment-body" id="div-comment-5484">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/75310c8eac96a64f8aa7a2404d9985e0?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              rhadoop
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5484">
              <time datetime="2014-03-28T16:46:47+00:00">
               2014/03/28 16:46
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             就是找不到rscript文件
            </p>
            <p>
             Caused by: java.io.IOException: Cannot run program "Rscript": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214) … 23 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at
            </p>
            <p>
             但是
             <br/>
             [root@amhdp1 R]# type -a Rscript
             <br/>
             Rscript is /usr/local/bin/Rscript
             <br/>
             麻烦帮我看一下，hadoop版本是
             <br/>
             [root@amhdp1 R]# hadoop version
             <br/>
             Hadoop 1.0.3.14
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给rhadoop" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5484#respond" onclick='return addComment.moveForm( "div-comment-5484", "5484", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5791">
            <article class="comment-body" id="div-comment-5791">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5791">
                <time datetime="2014-05-27T22:53:57+00:00">
                 2014/05/27 22:53
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               我不清楚，为什么需要rscript文件？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5791#respond" onclick='return addComment.moveForm( "div-comment-5791", "5791", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-5485">
          <article class="comment-body" id="div-comment-5485">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/75310c8eac96a64f8aa7a2404d9985e0?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              rhadoop
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5485">
              <time datetime="2014-03-28T17:33:01+00:00">
               2014/03/28 17:33
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             好吧 搞定了 谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给rhadoop" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5485#respond" onclick='return addComment.moveForm( "div-comment-5485", "5485", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2 parent" id="comment-6211">
            <article class="comment-body" id="div-comment-6211">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://weibo.com/1941315732" rel="external nofollow">
                 江湖帝
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6211">
                <time datetime="2014-09-13T03:28:01+00:00">
                 2014/09/13 03:28
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               How do you solve "Cannot run program "Rscript": error=2, No such file or directory"? I have the same issue. Thanks
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给江湖帝" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6211#respond" onclick='return addComment.moveForm( "div-comment-6211", "6211", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3" id="comment-6307">
              <article class="comment-body" id="div-comment-6307">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://t.qq.com/bjxupin" rel="external nofollow">
                   bjxupin
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6307">
                  <time datetime="2014-10-23T16:10:55+00:00">
                   2014/10/23 16:10
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 Caused by: java.io.IOException: Cannot run program "Rscript": java.io.IOException: error=2, No such file or directory
                 <br/>
                 at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
                 <br/>
                 at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:214)
                 <br/>
                 … 23 more
                </p>
                <p>
                 上面原因，确实是因为R和Rscript不是在/usr/bin/下面造成的，执行：
                 <br/>
                 sudo ln -s  $R_HOME/R/bin/Rscript   /usr/bin/Rscript
                 <br/>
                 sudo ln -s  $R_HOME/R/bin/R   /usr/bin/R
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
           <li class="comment even depth-2" id="comment-6471">
            <article class="comment-body" id="div-comment-6471">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/189c9b7017da14e9c1365d4ec007237e?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                xiaozhu
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6471">
                <time datetime="2014-12-23T20:20:28+00:00">
                 2014/12/23 20:20
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               怎么弄的呢，我的也是这种情况
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给xiaozhu" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6471#respond" onclick='return addComment.moveForm( "div-comment-6471", "6471", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-5495">
          <article class="comment-body" id="div-comment-5495">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2809225750" rel="external nofollow">
               Joahn_Cui
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5495">
              <time datetime="2014-04-01T17:09:47+00:00">
               2014/04/01 17:09
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             哪位帮忙看看，我安装rmr时报错了，R版本3.0.3，centos6.3，rmr2_3.0.0，使用R CMD INSTALL rmr2_3.0.0.tar.gz时出现下面的错误不知哪位遇到没有？
             <br/>
             错误日志如下
            </p>
            <p>
             * installing to library ‘/root/R/x86_64-unknown-linux-gnu-library/3.0’
             <br/>
             * installing *source* package ‘rmr2’ …
             <br/>
             ** libs
             <br/>
             ……
             <br/>
             g++ -I/usr/local/lib64/R/include -DNDEBUG  -I/usr/local/include   `/usr/local/lib64/R/bin/Rscript -e "Rcpp:::CxxFlags()"` -fpic  -g -O2  -c typed-bytes.cpp -o typed-bytes.o
             <br/>
             typed-bytes.cpp: In function ‘Rcpp::RObject unserialize(const raw&amp;, unsigned int&amp;, int)’:
             <br/>
             typed-bytes.cpp:264: error: ambiguous overload for ‘operator=’ in ‘new_object = unserialize_list(const raw&amp;, unsigned int&amp;)(((unsigned int&amp;)((unsigned int*)start)))’
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:35: note: candidates are: Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(const Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp;) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:49: note:                 Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(SEXPREC*) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             typed-bytes.cpp:267: error: ambiguous overload for ‘operator=’ in ‘new_object = unserialize_255_terminated_list(const raw&amp;, unsigned int&amp;)(((unsigned int&amp;)((unsigned int*)start)))’
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:35: note: candidates are: Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(const Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp;) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:49: note:                 Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(SEXPREC*) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             typed-bytes.cpp:270: error: ambiguous overload for ‘operator=’ in ‘new_object = unserialize_map(const raw&amp;, unsigned int&amp;)(((unsigned int&amp;)((unsigned int*)start)))’
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:35: note: candidates are: Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(const Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp;) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             /usr/local/lib64/R/library/Rcpp/include/Rcpp/RObject.h:49: note:                 Rcpp::RObject_Impl&lt;StoragePolicy&gt;&amp; Rcpp::RObject_Impl&lt;StoragePolicy&gt;::operator=(SEXPREC*) [with StoragePolicy = Rcpp::PreserveStorage]
             <br/>
             make: *** [typed-bytes.o] Error 1
             <br/>
             ERROR: compilation failed for package ‘rmr2’
             <br/>
             * removing ‘/root/R/x86_64-unknown-linux-gnu-library/3.0/rmr2’
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Joahn_Cui" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5495#respond" onclick='return addComment.moveForm( "div-comment-5495", "5495", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5790">
            <article class="comment-body" id="div-comment-5790">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5790">
                <time datetime="2014-05-27T22:53:09+00:00">
                 2014/05/27 22:53
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               不支持3.0.3，请使用2.15.3
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5790#respond" onclick='return addComment.moveForm( "div-comment-5790", "5790", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-5499">
          <article class="comment-body" id="div-comment-5499">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/niufen1991" rel="external nofollow">
               冰彬
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5499">
              <time datetime="2014-04-06T17:50:51+00:00">
               2014/04/06 17:50
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，我是在hdfs.init()的时候出现了问题，劳烦看一下问题出在哪儿，谢了！
             <br/>
             &gt; hdfs.init()
             <br/>
             Error: Could not find or load main class classpath
             <br/>
             Error in .jnew("org/apache/hadoop/conf/Configuration") :
             <br/>
             java.lang.ClassNotFoundException
             <br/>
             In addition: Warning message:
             <br/>
             running command ‘/home/hadoop/hadoop-0.20.2/bin/hadoop classpath’ had status 1
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给冰彬" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5499#respond" onclick='return addComment.moveForm( "div-comment-5499", "5499", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment even depth-2" id="comment-5789">
            <article class="comment-body" id="div-comment-5789">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5789">
                <time datetime="2014-05-27T22:52:32+00:00">
                 2014/05/27 22:52
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               似乎是JAVA没有配置正确
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5789#respond" onclick='return addComment.moveForm( "div-comment-5789", "5789", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
           <li class="comment odd alt depth-2" id="comment-6732">
            <article class="comment-body" id="div-comment-6732">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/9fc055b504b21f3e1a8b47738d54d613?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                echocai
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6732">
                <time datetime="2015-06-03T09:10:16+00:00">
                 2015/06/03 09:10
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               你好，在这里看到你对rhdfs的问题，http://cos.name/2013/03/rhadoop2-rhadoop/，我现在遇到了跟你一模一样的问题，不知道后来怎么解决的这个问题？
               <br/>
               &gt; hdfs.init()
               <br/>
               Error: Could not find or load main class classpath
               <br/>
               Error in .jnew(“org/apache/hadoop/conf/Configuration”) :
               <br/>
               java.lang.ClassNotFoundException
               <br/>
               In addition: Warning message:
               <br/>
               running command ‘/home/hadoop/hadoop-0.20.2/bin/hadoop classpath’ had status 1
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给echocai" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6732#respond" onclick='return addComment.moveForm( "div-comment-6732", "6732", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-5725">
          <article class="comment-body" id="div-comment-5725">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/edc0b8eedec92f4e7013f541035404aa?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              xjd
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5725">
              <time datetime="2014-05-17T15:36:54+00:00">
               2014/05/17 15:36
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，我想问一下，通过RHadoop能读Hadoop下的hdfs的数据吗，还是只能读rhdfs？就是说rhdfs只是R和HDFS的接口，数据还是存在Hadoop下的HDFS中。不知道理解正不正确，望指点一二，谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给xjd" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5725#respond" onclick='return addComment.moveForm( "div-comment-5725", "5725", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-5788">
            <article class="comment-body" id="div-comment-5788">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5788">
                <time datetime="2014-05-27T22:52:01+00:00">
                 2014/05/27 22:52
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               1. RHadoop可以读Hadoop下的hdfs的数据
               <br/>
               2. rhdfs是R与HADOOP的HDFS通信的接口程序
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5788#respond" onclick='return addComment.moveForm( "div-comment-5788", "5788", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-5751">
          <article class="comment-body" id="div-comment-5751">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/152332fb9bf2d822f9d1187b3e8d1795?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://zhouleyu.com" rel="external nofollow">
               zhouleyu.com
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5751">
              <time datetime="2014-05-21T13:42:58+00:00">
               2014/05/21 13:42
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，我想问一下，通过RHadoop能读Hadoop下的hdfs的数据吗，还是只能读rhdfs？就是说rhdfs只是R和HDFS的接口，数据还是存在Hadoop下的HDFS中。不知道理解正不正确，望指点一二，谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给zhouleyu.com" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5751#respond" onclick='return addComment.moveForm( "div-comment-5751", "5751", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-5787">
            <article class="comment-body" id="div-comment-5787">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1eb6ed512f9c94cac6e1536d2a285c68?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                bsspirit
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-5787">
                <time datetime="2014-05-27T22:51:44+00:00">
                 2014/05/27 22:51
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               1. RHadoop可以读Hadoop下的hdfs的数据
               <br/>
               2. rhdfs是R与HADOOP的HDFS通信的接口程序
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给bsspirit" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=5787#respond" onclick='return addComment.moveForm( "div-comment-5787", "5787", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1" id="comment-6003">
          <article class="comment-body" id="div-comment-6003">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/aacd8fbfd21f514a5f23ace4c2964db5?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              Jack lee
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6003">
              <time datetime="2014-07-07T11:39:25+00:00">
               2014/07/07 11:39
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             您好，我在R下运行library(rhdfs)和library（rmr2）都不成功不知道是什么原因
            </p>
            <p>
             其中运行library（rmr2）没有任何反映
            </p>
            <p>
             运行library（rhdfs）提示
             <br/>
             Loading required package: rJava
             <br/>
             HADOOP_CMD=/usr/lib/hadoop-0.20-mapreduce/bin/hadoop
             <br/>
             Be sure to run hdfs.init()
             <br/>
             但是运行hdfs.ini（）的时候提示错误
             <br/>
             Error in .jnew("org/apache/hadoop/conf/Configuration") :
             <br/>
             java.lang.ClassNotFoundException
            </p>
            <p>
             不知道是什么原因，感谢您的指导
             <br/>
             还有，请问R的日志在哪里呢？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Jack lee" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6003#respond" onclick='return addComment.moveForm( "div-comment-6003", "6003", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="pingback odd alt thread-odd thread-alt depth-1" id="comment-6067">
          <div class="comment-body">
           Pingback：
           <a class="url" href="http://www.dongchen.me/2014/07/r-with-hadoop-in-centos-local-mode-pseudo-distributed-mode/" rel="external nofollow">
            R with Hadoop in CentOS (Local Mode &amp; Pseudo-Distributed Mode) | 堇荼如饴
           </a>
          </div>
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1" id="comment-6073">
          <article class="comment-body" id="div-comment-6073">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/1eee30a427c83325214628f4309af916?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              laocan
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6073">
              <time datetime="2014-07-25T02:44:28+00:00">
               2014/07/25 02:44
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，请问一下，现在那3个r包都升级成最新版之后，能否用在java8上架的hadoop，谢谢~
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给laocan" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6073#respond" onclick='return addComment.moveForm( "div-comment-6073", "6073", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-6115">
          <article class="comment-body" id="div-comment-6115">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2008068565" rel="external nofollow">
               Et_Alors
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6115">
              <time datetime="2014-08-06T16:06:53+00:00">
               2014/08/06 16:06
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             你好，我想请问一下关于内存溢出的问题。     通过看各位网友的评论记录，我先跑了下 原生态的Hadoop，成功，确认Hadoop安装没有问题。然后关于 Rhadoop，加载rhdfs和rmr2也都没有问题，  在检验试例的时候，to.dfs()还一切正常，  可以一到mapreduce的时候就报错，我查了一下日志，是内存溢出，可是为什么在原生态Hadoop的就没溢出呢？  是不是我R的环境配置的有问题。   日志见下：
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Et_Alors" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6115#respond" onclick='return addComment.moveForm( "div-comment-6115", "6115", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-6116">
          <article class="comment-body" id="div-comment-6116">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2008068565" rel="external nofollow">
               Et_Alors
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6116">
              <time datetime="2014-08-06T16:10:36+00:00">
               2014/08/06 16:10
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             2014-08-06 12:08:24,141 INFO org.apache.hadoop.mapred.JobInProgress: Choosing data-local task task_201408061042_0004_m_000001
             <br/>
             75271 2014-08-06 12:08:27,168 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_201408061042_0004_m_000000_0: java.lang.RuntimeException: java.      lang.OutOfMemoryError: Java heap space
             <br/>
             75272     at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:376)
             <br/>
             75273     at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:576)
             <br/>
             （没有粘贴完整日志，只是把报错的部分贴出来了）
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Et_Alors" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6116#respond" onclick='return addComment.moveForm( "div-comment-6116", "6116", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment odd alt depth-2" id="comment-6565">
            <article class="comment-body" id="div-comment-6565">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://www.renren.com/profile.do?id=486119165" rel="external nofollow">
                 姚坤
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6565">
                <time datetime="2015-02-03T16:43:03+00:00">
                 2015/02/03 16:43
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               我也遇到这样的问题了，你的解决了吗？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给姚坤" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6565#respond" onclick='return addComment.moveForm( "div-comment-6565", "6565", "respond", "7551" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1" id="comment-6117">
          <article class="comment-body" id="div-comment-6117">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/2008068565" rel="external nofollow">
               Et_Alors
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6117">
              <time datetime="2014-08-06T16:13:46+00:00">
               2014/08/06 16:13
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             [XXXX@w-bi5 hadoop]$ hadoop jar hadoop-examples-1.2.1.jar wordcount /data/safe_tray-2014060802 /result2
             <br/>
             Warning: $HADOOP_HOME is deprecated.
            </p>
            <p>
             14/08/06 15:57:11 INFO input.FileInputFormat: Total input paths to process : 1
             <br/>
             14/08/06 15:57:11 INFO util.NativeCodeLoader: Loaded the native-hadoop library
             <br/>
             14/08/06 15:57:11 WARN snappy.LoadSnappy: Snappy native library not loaded
             <br/>
             14/08/06 15:57:11 INFO mapred.JobClient: Running job: job_201408061042_0009
             <br/>
             14/08/06 15:57:12 INFO mapred.JobClient:  map 0% reduce 0%
             <br/>
             14/08/06 15:57:19 INFO mapred.JobClient:  map 100% reduce 0%
             <br/>
             14/08/06 15:57:26 INFO mapred.JobClient:  map 100% reduce 33%
             <br/>
             14/08/06 15:57:28 INFO mapred.JobClient:  map 100% reduce 100%
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient: Job complete: job_201408061042_0009
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient: Counters: 29
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:   Job Counters
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Launched reduce tasks=1
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     SLOTS_MILLIS_MAPS=7272
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Total time spent by all reduces waiting after reserving slots (ms)=0
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Total time spent by all maps waiting after reserving slots (ms)=0
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Launched map tasks=1
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Data-local map tasks=1
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     SLOTS_MILLIS_REDUCES=9323
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:   File Output Format Counters
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Bytes Written=25215501
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:   FileSystemCounters
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     FILE_BYTES_READ=53001622
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     HDFS_BYTES_READ=31606666
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     FILE_BYTES_WRITTEN=79318562
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     HDFS_BYTES_WRITTEN=25215501
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:   File Input Format Counters
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Bytes Read=31606537
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:   Map-Reduce Framework
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Map output materialized bytes=26204636
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Map input records=94455
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Reduce shuffle bytes=26204636
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Spilled Records=563280
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Map output bytes=36956408
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     CPU time spent (ms)=9950
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Total committed heap usage (bytes)=399769600
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Combine input records=1530052
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     SPLIT_RAW_BYTES=129
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Reduce input records=181164
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Reduce input groups=181164
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Combine output records=382116
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Physical memory (bytes) snapshot=419143680
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Reduce output records=181164
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Virtual memory (bytes) snapshot=2251956224
             <br/>
             14/08/06 15:57:29 INFO mapred.JobClient:     Map output records=1329100
            </p>
            <p>
             （原生态Hadoop可以正常跑，也没报内存问题，是不是我的R的环境配置有问题，求版主指点迷津）
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Et_Alors" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6117#respond" onclick='return addComment.moveForm( "div-comment-6117", "6117", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1" id="comment-6270">
          <article class="comment-body" id="div-comment-6270">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://t.qq.com/fcg190677081" rel="external nofollow">
               Sahara
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6270">
              <time datetime="2014-10-09T22:27:51+00:00">
               2014/10/09 22:27
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             尊敬的张先生  您好！
             <br/>
             有两个问题想请教您！
             <br/>
             第一：利用R编写的mapreduce程序得到了最终结果后（from.dfs("/tmp/xxx")），如果把这些分析结果作为源数据，还能利用R的画图函数生成数据图么？（这样显得更清晰）有没有什么参考的例子？
             <br/>
             第二 还有一个问题就是 R分析得到的结果 只能在Rhdfs 上面查看吗？如何导出来？
             <br/>
             我的邮箱是190677081@qq.com  两个问题   感激不尽吶！谢谢
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Sahara" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6270#respond" onclick='return addComment.moveForm( "div-comment-6270", "6270", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1" id="comment-6822">
          <article class="comment-body" id="div-comment-6822">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/e37063010d3ee49399f83b1ad791ed62?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              黄维付
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#comment-6822">
              <time datetime="2015-08-20T17:18:48+00:00">
               2015/08/20 17:18
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             老师这个是什么原因，一直搞不定：
             <br/>
             install.packages(“plyr”)
             <br/>
             警告信息：
             <br/>
             package ‘plyr’ is not available (for R version 2.15.3)
             <br/>
             &gt; install.packages(“reshape2”)
             <br/>
             警告: dependency ‘plyr’ is not available
             <br/>
             试开URL’http://mirrors.xmu.edu.cn/CRAN/src/contrib/reshape2_1.4.1.tar.gz’
             <br/>
             Content type ‘application/x-gzip’ length 34693 bytes (33 Kb)
             <br/>
             打开了URL
             <br/>
             ==================================================
             <br/>
             downloaded 33 Kb
            </p>
            <p>
             ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
             <br/>
             * removing ‘/usr/local/lib64/R/library/reshape2’
            </p>
            <p>
             下载的程序包在
             <br/>
             ‘/tmp/Rtmp9YZ17D/downloaded_packages’里
             <br/>
             更新’.Library’里的HTML程序包列表
             <br/>
             制造packages.html … 做完了。
             <br/>
             警告信息：
             <br/>
             In install.packages(“reshape2”) : 安装程序包‘reshape2’时退出??的值不是0
             <br/>
             In install.packages(“/data/R/plyr_1.8.3.tar.gz”, repos = NULL) :
             <br/>
             安装程序包‘/data/R/plyr_1.8.3.tar.gz’时退出狀態的值不是0
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给黄维付" class="comment-reply-link" href="http://cos.name/2013/03/rhadoop2-rhadoop/?replytocom=6822#respond" onclick='return addComment.moveForm( "div-comment-6822", "6822", "respond", "7551" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
        </ol>
        <!-- .comment-list -->
        <div class="comment-respond" id="respond">
         <h3 class="comment-reply-title" id="reply-title">
          发表评论
          <small>
           <a href="http://cos.name/2013/03/rhadoop2-rhadoop/#respond" id="cancel-comment-reply-link" rel="nofollow" style="display:none;">
            取消回复
           </a>
          </small>
         </h3>
         <form action="http://cos.name/wp-comments-post.php" class="comment-form" id="commentform" method="post" novalidate="">
          <p class="comment-notes">
           <span id="email-notes">
            电子邮件地址不会被公开。
           </span>
           必填项已用
           <span class="required">
            *
           </span>
           标注
          </p>
          <p class="comment-form-comment">
           <label for="comment">
            评论
           </label>
           <textarea aria-required="true" cols="45" id="comment" maxlength="65525" name="comment" required="required" rows="8">
           </textarea>
          </p>
          <p class="comment-form-author">
           <label for="author">
            姓名
            <span class="required">
             *
            </span>
           </label>
          </p>
          <p class="comment-form-email">
           <label for="email">
            电子邮件
            <span class="required">
             *
            </span>
           </label>
          </p>
          <p class="comment-form-url">
           <label for="url">
            站点
           </label>
          </p>
          <p class="form-submit">
          </p>
          <p style="display: none;">
          </p>
          <p style="display: none;">
          </p>
         </form>
        </div>
        <!-- #respond -->
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          关注统计之都
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            新浪微博
            <a href="http://weibo.com/cosname">
             @统计之都
            </a>
           </li>
           <li>
            人人网
            <a href="http://renren.com/cosname">
             @统计之都
            </a>
           </li>
           <li>
            Twitter
            <a href="http://twitter.com/cos_name">
             @cos_name
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-6">
         <h3 class="widget-title">
          微信公众平台
         </h3>
         <div class="textwidget">
          <img src="http://cos.name/wp-content/uploads/2013/04/qrcode-8cm.jpg"/>
          <p style="font-size:12px;margin-left:15px">
           微信号 CapStat
          </p>
          <p>
           我们将第一时间向您推送主站和论坛的精彩内容，以及统计之都的线下活动、竞赛、培训和会议信息。
          </p>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-8">
         <h3 class="widget-title">
          站内导航
         </h3>
         <div class="textwidget">
          <ul>
           <li class="page_item">
            <a href="http://cos.name/cn/">
             中文论坛
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/videos/">
             视频
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/salon/">
             统计沙龙
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/books/">
             图书出版
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/training/">
             教育培训
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/about/">
             关于我们
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/donate/">
             捐赠
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/chinar/">
             R语言会议
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_links" id="linkcat-2">
         <h3 class="widget-title">
          友情链接
         </h3>
         <ul class="xoxo blogroll">
          <li>
           <a href="http://stat.ruc.edu.cn" target="_blank" title="中国人民大学统计学院网站">
            中国人民大学统计学院
           </a>
          </li>
          <li>
           <a href="http://rucdmc.net">
            中国人民大学数据挖掘中心
           </a>
          </li>
          <li>
           <a href="http://birc.gsm.pku.edu.cn/" target="_blank">
            北京大学商务智能研究中心
           </a>
          </li>
          <li>
           <a href="http://sam.cufe.edu.cn/" target="_blank" title="中央财经大学统计与数学学院网站">
            中央财经大学统计与数学学院
           </a>
          </li>
          <li>
           <a href="http://tjx.cueb.edu.cn/" target="_blank" title="首都经济贸易大学统计学院网站">
            首经贸统计学院
           </a>
          </li>
          <li>
           <a href="http://www.shookr.com/">
            数客网大数据社区
           </a>
          </li>
          <li>
           <a href="http://www.xueqing.tv/" target="_blank" title="数据科学在线学习平台">
            雪晴数据网
           </a>
          </li>
          <li>
           <a href="http://iera.name/" target="_blank" title="IERA是一个旨在普及、传播和增进工业工程知识的非营利性网站">
            IERA（直通IE）
           </a>
          </li>
         </ul>
        </aside>
        <aside class="widget widget_categories" id="categories-2">
         <h3 class="widget-title">
          全部分类
         </h3>
         <label class="screen-reader-text" for="cat">
          全部分类
         </label>
         <select class="postform" id="cat" name="cat">
          <option value="-1">
           选择分类目录
          </option>
          <option class="level-0" value="925">
           cos访谈  (4)
          </option>
          <option class="level-0" value="659">
           图书出版  (5)
          </option>
          <option class="level-0" value="379">
           数学方法  (14)
          </option>
          <option class="level-1" value="381">
           分析与代数  (1)
          </option>
          <option class="level-1" value="380">
           概率论  (9)
          </option>
          <option class="level-1" value="382">
           随机过程  (5)
          </option>
          <option class="level-0" value="210">
           数据分析  (81)
          </option>
          <option class="level-1" value="203">
           多元统计  (3)
          </option>
          <option class="level-1" value="42">
           数据挖掘与机器学习  (42)
          </option>
          <option class="level-1" value="36">
           生物与医学统计  (17)
          </option>
          <option class="level-1" value="35">
           计量经济学  (4)
          </option>
          <option class="level-1" value="296">
           金融统计  (3)
          </option>
          <option class="level-1" value="303">
           风险精算  (7)
          </option>
          <option class="level-0" value="177">
           模型专题  (15)
          </option>
          <option class="level-1" value="38">
           回归分析  (10)
          </option>
          <option class="level-1" value="41">
           时间序列  (2)
          </option>
          <option class="level-0" value="784">
           每周精选  (24)
          </option>
          <option class="level-1" value="183">
           可视化  (9)
          </option>
          <option class="level-0" value="967">
           沙龙纪要  (3)
          </option>
          <option class="level-0" value="18">
           经典理论  (46)
          </option>
          <option class="level-1" value="37">
           抽样调查  (3)
          </option>
          <option class="level-1" value="4">
           统计推断  (26)
          </option>
          <option class="level-1" value="236">
           试验设计  (7)
          </option>
          <option class="level-1" value="39">
           非参数统计  (3)
          </option>
          <option class="level-0" value="1">
           统计之都  (279)
          </option>
          <option class="level-1" value="884">
           中国R会议  (2)
          </option>
          <option class="level-1" value="885">
           中国R语言会议  (5)
          </option>
          <option class="level-1" value="446">
           出国留学  (3)
          </option>
          <option class="level-1" value="179">
           推荐文章  (90)
          </option>
          <option class="level-1" value="3">
           新闻通知  (75)
          </option>
          <option class="level-1" value="263">
           统计刊物  (10)
          </option>
          <option class="level-1" value="174">
           网站导读  (40)
          </option>
          <option class="level-1" value="204">
           职业事业  (51)
          </option>
          <option class="level-1" value="213">
           高校课堂  (9)
          </option>
          <option class="level-0" value="178">
           统计计算  (28)
          </option>
          <option class="level-1" value="40">
           优化与模拟  (15)
          </option>
          <option class="level-1" value="43">
           贝叶斯方法  (6)
          </option>
          <option class="level-0" value="378">
           软件应用  (116)
          </option>
          <option class="level-1" value="44">
           统计图形  (36)
          </option>
          <option class="level-1" value="110">
           统计软件  (83)
          </option>
         </select>
        </aside>
        <aside class="widget widget_recent_comments" id="recent-comments-2">
         <h3 class="widget-title">
          最新评论
         </h3>
         <ul id="recentcomments">
          <li class="recentcomments">
           <span class="comment-author-link">
            fineboom
           </span>
           发表在《
           <a href="http://cos.name/2016/06/use-shiny-fleetly-set-up-visual-prototype-system/#comment-7317">
            利用shiny包快速搭建可视化原型系统
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            胡家新
           </span>
           发表在《
           <a href="http://cos.name/2016/06/r%e8%af%ad%e5%8d%83%e5%af%bb%e7%ac%ac%e4%b8%89%e6%9c%9f%ef%bc%9a%e5%bc%a0%e6%97%a0%e5%bf%8c%e7%a9%b6%e7%ab%9f%e7%88%b1%e8%b0%81%ef%bc%9f/#comment-7316">
            R语千寻第三期：张无忌究竟爱谁？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            <a class="url" href="http://www.zijiacha.com/category.php?id=6" rel="external nofollow">
             南糯山普洱茶
            </a>
           </span>
           发表在《
           <a href="http://cos.name/2016/06/r%e8%af%ad%e5%8d%83%e5%af%bb%e7%ac%ac%e4%b8%89%e6%9c%9f%ef%bc%9a%e5%bc%a0%e6%97%a0%e5%bf%8c%e7%a9%b6%e7%ab%9f%e7%88%b1%e8%b0%81%ef%bc%9f/#comment-7315">
            R语千寻第三期：张无忌究竟爱谁？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            J
           </span>
           发表在《
           <a href="http://cos.name/2016/05/value-of-the-reputation-from-the-data/#comment-7314">
            数据告诉你：高信誉的卖家应该收高价，还是收低价？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            <a class="url" href="http://gg" rel="external nofollow">
             Hilda
            </a>
           </span>
           发表在《
           <a href="http://cos.name/2013/01/drawing-map-in-r-era/#comment-7311">
            R时代，你要怎样画地图？
           </a>
           》
          </li>
         </ul>
        </aside>
        <aside class="widget widget_rss" id="rss-282869971">
         <h3 class="widget-title">
          <a class="rsswidget" href="http://cos.name/cn/topics/feed/">
           <img src="http://cos.name/wp-includes/images/rss.png"/>
          </a>
          <a class="rsswidget" href="http://cos.name/cn/topics/feed/">
           中文论坛新帖
          </a>
         </h3>
         <ul>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/417372/">
            处理时间数据和产生时间序列的问题
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/6790/">
            《统计陷阱》下载 （How to lie with statistics）
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/818/">
            统计学的世界（第五版）
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/16574/">
            class(x) 返回值值是AsIs,AsIs代表什么，有什么用处？
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/417366/">
            如何用R绘制一个分类算法的决策规则
           </a>
          </li>
         </ul>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          登录/RSS
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/wp-admin/">
             登录
            </a>
           </li>
           <li>
            <a href="http://cos.name/feed/" title="使用 RSS 2.0 同步站点内容">
             文章
             <abbr title="Really Simple Syndication">
              RSS
             </abbr>
            </a>
           </li>
           <li>
            <a href="http://cos.name/comments/feed/" title="RSS 上的最近评论">
             评论
             <abbr title="Really Simple Syndication">
              RSS
             </abbr>
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
   <p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <a href="http://www.wumii.com/widget/relatedItems" style="border:0;">
     <img src="http://static.wumii.cn/images/pixel.png"/>
    </a>
   </p>
  </div>
 </body>
</html>